How to look back few bar in EA Wizard
3 replies
kael
8 years ago #113727
hi,
I am a newbie to EA Wizard.
I tried many times to use EA wizard to look back for few bar but unfortunately i couldn’t find how to.
Appreciate to help how to look back for few bar back and look for certain rules.
pseudocode example as below.
1. Look back within 10 bars of high and low
2. if high >= moving average then Trend = 1
3. if low <= moving average then Trend = 2
4. if trend 1 and low current bar <= price data then buy
5. if trend 2 and high current bar >= price data then sell
Thanks in advance.
tomas262
8 years ago #130579
hi kael,
I can help you with that but not sure what you mean by ‘price data’. What does this represents? Thanks
kael
8 years ago #130622
hi kael,
I can help you with that but not sure what you mean by ‘price data’. What does this represents? Thanks
Hi thomas,
maybe i should say the price itself either bid or ask.
Thanks in advance for your help.
tomas262
8 years ago #130634
Hi,
- if you just want to find out if 1 of 10 bars back has its High above moving average then simply use rule Close > (indicator) Moving Average
- if you want to find out if the highest high of 10 bars back is above moving average then use: (Custom Indicator) Highest(10) > (indicator) Moving Average
or do you mean something else?
Viewing 3 replies - 1 through 3 (of 3 total)