I need your help with this particular bug i am facing
1. I am building a EA using MQL4 the ea place Stop orders at the low and high of the previous day candles depending on bullish or bearish candle,
2. The trade will be only places when the new candle is open to achieve this i am using the following code.
3. The EA is attached to EURUSD chart
4. I am trading all the currencies present in market watch using the following code.
5. I am accessing the previous day low and high using the following code
6. The problem i am facing is the ea is accessing low and high of EURUSD properly which the chart EA is attached to rest all the currencies they before yesterdays low and high is being used this is the bug. For all the currencies last day low and high need to be used please help.
EURUSD_high = iHigh( SymbolName(i,true), PERIOD_D1, 1);
try something like this https://docs.mql4.com/series/ihigh
but note: the symbol needs to be shown to get the value, if you are trading multiple currencies be sure to enable the ones you are using- docs.mql4.com
Thank you for the reply.
I am using iHigh and iLow please look at the code in Sl No. 5
I am only accesing the values which are present in Market watch
please look at the code in sl no 4.
Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26 № 4
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I need your help with this particular bug i am facing
1. I am building a EA using MQL4 the ea place Stop orders at the low and high of the previous day candles depending on bullish or bearish candle,
2. The trade will be only places when the new candle is open to achieve this i am using the following code.
3. The EA is attached to EURUSD chart
4. I am trading all the currencies present in market watch using the following code.
5. I am accessing the previous day low and high using the following code
6. The problem i am facing is the ea is accessing low and high of EURUSD properly which the chart EA is attached to rest all the currencies they before yesterdays low and high is being used this is the bug. For all the currencies last day low and high need to be used please help.