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)
Easylanguage Intrabarordergeneration Problem (Signal too late)
Hello,
i am new to the forum and this is my first post.
I want to write a simple strategy in EL but i am having some problems.
The entry comes 1 bar too late, so either the intrabarordergeneration or my bar referencing is causing problems.
As this is my first post i can not send a screenshot unfortunately.
Entry rules for short:
When a bar closes above the previous bars high, i want to go short as soon as the low of the bar that closed higher breaks during the next candle. I dont want to make the trade if the trigger candle is an outside candle or if the open of the trigger candle is outside of the previous candle.
So actually it is a 3 bar pattern:
Bar 1: doesnt really matter
Bar 2: close of bar 2 has to be greater than the high of bar 1
Bar 3: This is the trigger candle. I want this candle to break the low of bar 2. Thats when i want to sell short. However, the high of bar 3 has to be lower than the high of bar 2 and the open of bar 2 has to be inside of bar 2īs range.
The logic is the exact opposite for long trades.
Seems like i am having some trouble with the EL logic about referencing the bars. I am sometimes not sure at what point in time Tradestation reads my code so i am having problems referencing the correct bar. Maybe someone can help me out.
This is the code:
Thanks for your help
Can you help answer these questions from other members on NexusFi?
welcome to futures.io. You only evaluate your order conditions at the end of a bar, since you placed them inside the "if BarStatus( 1 ) = 2 then" conditional branch.
The order would then get filled at the open of the next bar, if the conditions for an entry are present.