Please use this to post code . . . it makes it easier to read.
can you fix this code so that if the criteria for a buy trade is met
but the current candle is bearish on the 1m chart the ea should not
trade and also if the criteria for a sell trade is met but the current
candle on the 1m chart is bullish the ea should not trade.
You can't know if the current M1 candle is bullish or bearish until it is finished . . then it becomes candle number 1
can you think of a way to achieve the same goal?
can you think of a way to achieve the same goal?
could say if price is lower than the previous candle's high then dont trade.
what do you think and vice versa, can we talk on skype or something it takes a while to get replies on here, skype name: ace112
could say if price is lower than the previous candle's high then dont trade.
what do you think and vice versa, can we talk on skype or something it takes a while to get replies on here, skype name: ace112
Sorry too busy for that . . . unless you want to pop over and make my Christmas cake for me ?
Just use M1 bar 1 . . . check the Open vs the Close values to determine if it Bull or Bear . .
https://docs.mql4.com/series/iOpen vs https://docs.mql4.com/series/iClose

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
double macd_main = iMACD(a_symbol_0,0,12,26,9,PRICE_CLOSE,MODE_MAIN,1);
double macd_sig = iMACD(a_symbol_0,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,1);
if ((a_cmd_8==OP_BUY)&&(macd_main<0))
{
return(0);
}
if ((a_cmd_8==OP_SELL)&&(macd_main>0))
{
return(0);
}
can you fix this code so that if the criteria for a buy trade is met
but the current candle is bearish on the 1m chart the ea should not
trade and also if the criteria for a sell trade is met but the current
candle on the 1m chart is bullish the ea should not trade.