Last open trade status (void function) New comment sharteel 2011.08.10 23:55 Hi, If anyone need. how can i to know the last open trade status ? void LastOpenTrade_function(int nb) { for (int cnt=0;cnt<OrdersTotal()-nb;cnt++) { OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES); if (OrderSymbol()==Symbol() && OrderMagicNumber()==Magic) { //---- BUY or SELL if (OrderType()==OP_BUY || OrderType()==OP_SELL || OrderType()==OP_BUYSTOP || OrderType()==OP_BUYLIMIT || OrderType()==OP_SELLSTOP || OrderType()==OP_SELLLIMIT){ double LastOpenTrade=OrderOpenPrice(); double LastLotTrade=OrderLots(); double LastStopLossTrade=OrderStopLoss(); double LastTakeProfitTrade=OrderTakeProfit(); double LastCommentTrade=OrderComment(); } else { LastOpenTrade=0; } } } } Later How do you calculate Lot size Scanning the history counting consecutive losses and profits Error Message in journal New comment
Hi,
If anyone need.
how can i to know the last open trade status ?
Later