Hello Guys,
i want my ea to recognize when a new high or low has been made, i.e. higher high or lower low.
I want when that happens then go short or long but i do not know how to call the last candle or how to figure out the value of the last candle so that the program knows .
Thanks for your Help.
Not possible to provide help without code....
hello shl233
in order to do this you will need to initialize an array for prices buffer then set the array as series to index the elements
then copy data prices of candles to the array,
you can see below
ArraySetAsSeries(Array[], true); int data = CopyRates(symbol, _Period, 0, 50, Array[]);
after executing these two instructions you can call the array[candlenumber].high to get the value of the previous high and compare it to other value
let me know if this works!
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello Guys,
i want my ea to recognize when a new high or low has been made, i.e. higher high or lower low.
I want when that happens then go short or long but i do not know how to call the last candle or how to figure out the value of the last candle so that the program knows .
Thanks for your Help.