DislikedHello Does anyone know what code to add in front of buy or sell code order, so the EA will take one trade per bar only, mt4 Thannks,Ignored
Take-out the Order part from Start and make it a void CheckForTrade() section
Insert IsNewCandle() CheckForTrade() function in Start
//+------------------------------------------------------------------+
//| Insuring Its a New Candle Function |
//+------------------------------------------------------------------+
bool IsNewCandle()
{
static int BarsOnChart = 0;
if(Bars == BarsOnChart)
return(false);
BarsOnChart = Bars;
return(true);
}
2