Forum

Detect any condition has already meet

do { int entry_buy() { Close[0]>Main_Trend; Close[0]>Sub_Trend; Close[0]>Third_Trend; Close[0]>Fourth_Trend; Close[0]>Fifth_Trend; Close[0]>Sixth_Trend; Close[0]>Seventh_Trend; Close[0]>Eighth_Trend;

Tracking order by using OrderMagicNumber for an EA

I have a question regrading on the OrderMagicNumber. I knew that we can set a manual magic number in the EA settings to set our strategies. But I counter a problem which is during backtesting which I track down previous order by using for ( int i=OrdersHistoryTotal()- 1 ; i < OrdersHistoryTotal();

Check multiple previous order

for ( int j=OrdersHistoryTotal()- 2 ; j < OrdersHistoryTotal(); j++) if ( OrderSelect (j,SELECT_BY_POS,MODE_HISTORY)== true ) { for ( int i=OrdersHistoryTotal()- 1 ; i < OrdersHistoryTotal(); i++) if ( OrderSelect (i,SELECT_BY_POS,MODE_HISTORY)==

Add lotsize next order after a loss on previuos order

input string symbol = NULL ; input int timeframe = 0 ; input double lotsize= 0.1 ; input int stoploss = 0 ; input int takeprofit= 0 ; input double Martingale_multiple_value = 2 ; //+------------------------------------------------------------------+ //| Calculation of volume martingale

Close order error

Hi, I'm new in this industrial. I have one error regrading the close order. My EA is using indicator crossover to open an order, and my condition to close an order is when iClose is greater then indicator it will automatic close and order after the specific bar of candlestick closed. But I having