EasyLanguage Code to stop strategy for the day - EasyLanguage Programming | futures io social day trading
futures io futures trading


EasyLanguage Code to stop strategy for the day
Updated: Views / Replies:5,668 / 12
Created: by skiman721 Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

EasyLanguage Code to stop strategy for the day

  #1 (permalink)
Elite Member
North Bay
 
Futures Experience: Intermediate
Platform: NT, ToS, MulitCharts
Broker/Data: NT, TD
Favorite Futures: ES, CL
 
Posts: 39 since Nov 2011
Thanks: 10 given, 9 received

EasyLanguage Code to stop strategy for the day

I have created an EL signal using Multicharts but I'm missing one thing. I only want to strategy to trade during a certain period of time. What is the simplest way to have the strategy stop looking for the setup after a certain time (or number of bars would work) and not turn back on until the next day? Specifically - if the signal is not valid before 10am then it would not take a trade until the following day, if valid. I think having a valid time of 9:30-10:00 would work but I don't know how to code that.

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Colorado
 
Futures Experience: Advanced
Platform: MultiCharts
Broker/Data: IB & Iqfeed
Favorite Futures: ES , CL
 
sptrader's Avatar
 
Posts: 533 since Apr 2010
Thanks: 1,080 given, 668 received


Try something like this :

If time >= 0930 and time <= 1000 then begin
"put your buy or sell condition here"
end;

" put your exit rules here"

Reply With Quote
The following user says Thank You to sptrader for this post:
 
  #4 (permalink)
Elite Member
North Bay
 
Futures Experience: Intermediate
Platform: NT, ToS, MulitCharts
Broker/Data: NT, TD
Favorite Futures: ES, CL
 
Posts: 39 since Nov 2011
Thanks: 10 given, 9 received


sptrader View Post
Try something like this :

If time >= 0930 and time <= 1000 then begin
"put your buy or sell condition here"
end;

" put your exit rules here"

That works, Thanks!

Still learning EL... I have a lot of work to do.

Reply With Quote
 
  #5 (permalink)
Elite Member
North Bay
 
Futures Experience: Intermediate
Platform: NT, ToS, MulitCharts
Broker/Data: NT, TD
Favorite Futures: ES, CL
 
Posts: 39 since Nov 2011
Thanks: 10 given, 9 received

I'm working on a opening gap signal. I only want the signal to trigger if the gap is between 8 and 20 ticks, nothing less, nothing more. Below is what I have but it is only triggering gaps of exactly 8 and 20 ticks. How do I get it to be a range?


 
Code
                            
//I have the Min and MaxGap as inputs.

if (High MinGap) <= low[1] and (High MaxGap) <= low[1then
    buy 
"GapDn - Buy" next bar at market 

Reply With Quote
 
  #6 (permalink)
Elite Member
near Paris, France
 
Futures Experience: Beginner
Platform: -
Favorite Futures: -
 
Nicolas11's Avatar
 
Posts: 1,070 since Aug 2011
Thanks: 2,232 given, 1,729 received

@kiman721,

What is your timeframe?
What is your definition of a "gap" ?
Shouldn't you compare C[1] and O instead of Highs and Lows?

Nicolas

Reply With Quote
 
  #7 (permalink)
Elite Member
North Bay
 
Futures Experience: Intermediate
Platform: NT, ToS, MulitCharts
Broker/Data: NT, TD
Favorite Futures: ES, CL
 
Posts: 39 since Nov 2011
Thanks: 10 given, 9 received


Nicolas11 View Post
@kiman721,

What is your timeframe?
What is your definition of a "gap" ?
Shouldn't you compare C[1] and O instead of Highs and Lows?

Nicolas

Timeframe is 2 min bars (most promising timeframe profit wise so far)
Inputs: MinGap (8) and MaxGap (20) - want to make it adjustable by tick
I could do closeD[1] and open. I probably will do that because it's easier that defining a valid time for the signal (which is what I started to do to avoid any gaps after the open). I used Highs and Lows because I stated playing with the preloaded Gap entry signal in MC. I'm still learning, the only programming skills I have came from some HTML / C++ programing in High School.

Reply With Quote
 
  #8 (permalink)
Elite Member
North Bay
 
Futures Experience: Intermediate
Platform: NT, ToS, MulitCharts
Broker/Data: NT, TD
Favorite Futures: ES, CL
 
Posts: 39 since Nov 2011
Thanks: 10 given, 9 received

Thanks Nicholas, The CloseD and Open is much easier.

This is what I have but its still taking trades > 20 and < 4 ticks. And randomly weeding out others.

 
Code
                            
[IntrabarOrderGeneration True]


Inputs:
    
MaxGap        (20),
    
MinGap        (4);

vars:

    
TickSize    MinMove PriceScale );

//Gap Down
if (Open + (MinGap TickSize)) < CloseD(1) and (Open + (MaxGap TickSize)) < CloseD(1then
    buy 
"GapDn - Buy" next bar at market ;
    
//Gap Up
if (Open - (MinGap TickSize)) > CloseD(1) and (Open - (MinGap TickSize)) > CloseD(1then
    sellshort 
"GapUp - Sell" next bar at market ;
end

Reply With Quote
 
  #9 (permalink)
Elite Member
near Paris, France
 
Futures Experience: Beginner
Platform: -
Favorite Futures: -
 
Nicolas11's Avatar
 
Posts: 1,070 since Aug 2011
Thanks: 2,232 given, 1,729 received

kiman721,

Your mathematical formula seem wrong.

 
Code
//Gap Down

if (Open + (MinGap * TickSize)) < CloseD(1) and (Open + (MaxGap * TickSize)) < CloseD(1) then

    buy ( "GapDn - Buy" ) next bar at market ;
The second "<" should be a ">", no?

Nicolas

Reply With Quote
The following 2 users say Thank You to Nicolas11 for this post:
 
  #10 (permalink)
Elite Member
North Bay
 
Futures Experience: Intermediate
Platform: NT, ToS, MulitCharts
Broker/Data: NT, TD
Favorite Futures: ES, CL
 
Posts: 39 since Nov 2011
Thanks: 10 given, 9 received



Nicolas11 View Post
kiman721,

Your mathematical formula seem wrong.

 
Code
//Gap Down

if (Open + (MinGap * TickSize)) < CloseD(1) and (Open + (MaxGap * TickSize)) < CloseD(1) then

    buy ( "GapDn - Buy" ) next bar at market ;
The second "<" should be a ">", no?

Nicolas

Nicholas, I think your correct, I changed it and also adjusted the Gap up. I also needed to adjust the MinGap * Ticksize calculation. Looks to be working now.

Thanks for your help

Pete


Last edited by skiman721; June 23rd, 2012 at 01:34 PM.
Reply With Quote

Reply



futures io > > > > > EasyLanguage Code to stop strategy for the day

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
VIDEO TUTORIAL: How to create an advanced MultiCharts EasyLanguage Strategy Big Mike MultiCharts 39 November 9th, 2017 04:35 AM
EasyLanguage VWAP code help MilesT Open E Cry 12 April 18th, 2014 04:01 PM
BE and Trail Stop Strategy Code vegasfoster NinjaTrader 1 September 14th, 2011 10:30 PM
Volume stop Strategy Possible ? isarhodes NinjaTrader Programming 5 July 12th, 2011 05:02 PM
BMT CCI Pivot Zone easylanguage code for Market Delta? kienow Investor/RT 1 February 16th, 2011 03:37 PM


All times are GMT -4. The time now is 01:06 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-16 in 0.13 seconds with 19 queries on phoenix via your IP 54.91.38.173