Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I'm trying to get my strategy to buy at the close of that bar and not the open. Can anyone assist? To put in another way, its buying at the close of the bar after the initial change of brick colors. I can't figure this out. Might seem silly, but I think it will give me a moe accurate back test.
you could store the bar number in a variable (let's call it longTriggerBar in this example; and I'd suggest using separate variables for long and short) when your entry conditions are true. Then you can issue your orders when CurrentBar +1 = longTriggerBar and use "this bar on Close" instead of "next bar at market" in the command. However, please keep in mind that in real time a "this bar on Close" order would not be a market on Close order, but get filled around the open of the next bar.
Thank you so much for the post!! I tried several iterations of that and could not get it to work. It keeps asking me for a numerical expression where the equal sign is. I tried a greater than, that didn't work either.
I am sure someone on futures.io could steer you in the right direction and it might encourage help if you would post the full code (preferably within Code tags) that is giving you the compilation error you describe.
<code>
{ Helpful instructions on the use of EasyLanguage, such as this, appear below and are
contained within French curly braces {}. There is no need to erase these
instructions when using EasyLanguage in order for it to function properly, because
this text will be ignored. }
{ STEP 1 OF 2: Replace <CRITERIA> with the criteria that will trigger a Buy at the open
of the next bar using a market order. }
Condition1 = c[0]>o[0] ;
Condition2 = o[0]>c[0] ;
{ STEP 2 OF 2: Replace "Entry Name" (leaving the quotes) with a short name for the
entry. The entry name will appear on the chart above/below the trade arrows and in
the trade by trade performance report. }
if Condition2 then Value1 = BarNumber;
if BarNumber > Value1 + 1 then
Buy ( "Free Money" ) 1 Share next bar at market ;
if Condition2 then
Sell ( "Keep Money" ) 1 Share next bar at market ;