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 need some help understanding how to reference previous bars within EL. I am working on a strategy that trades based on if the previous bar was an outside bar.
Entry:
Exit:
The problem is when I go to set the price for my limit order it does not reference the high of the previous bar (the outside bar) but rather the high of the current bar (which just ends up being the open). When I attempt to use High[1] to reference the previous bar it references the bar behind the outside bar. I've attached screenshots for more detail.
Obviously there is something I'm not understanding about how bars are referenced. If someone is willing to enlighten me I would appreciate it.
Can you help answer these questions from other members on NexusFi?
What you are doing here is evaluating the CURRENT bar to see if it is an outside bar. And you want to see if the bar before this one is an outside bar, right?
Couple ways to do it, I'd do it this way (easiest way to read):
var:obBar(False);
obBar=OutsideBar(High,Low) ; //ObBar will be true if this bar is outside bar, false if not
if ObBar[1] and Close > Open then //is previous bar an outside bar?
Buy ( !( "OutBarLE" ) ) next bar at High limit;