obtained it and invite you.Originally Posted by ;
I guess I'll Be Back is probably going to happen Sooner or Later
obtained it and invite you.Originally Posted by ;
I guess I'll Be Back is probably going to happen Sooner or Later
Hello
Pleased to say made some improvement since my last trip.
I have managed to open transactions successfully in MQL at given points, (I understand large woo) but for a reason I can't shut any .
I'm in MT4 Strategy Tester, running it through to where the trade should shut.
The Text Objext Cls appears as it should but the one open order is not closed.
All under void OnTick()
There are errors 0 warnings.
I am not getting any Alert windows popping up but presume that's because everything is in test mode.
I put a Comment from the loop to see if the code has been running to it ok . To me it seems to affirm everything should operate, with there being one short trade open prepared to be shut, however, the bool reslt factor returns 0.
The Comment shows on screen:
String = Short
Reslt = 0
Open Orders = 1
Please would you help.
Inserted Code for(int I=OrdersTotal(); igt;=0;I--) //all available orders if (OrderSelect(I,SELECT_BY_POS)== true) if (OrderSymbol() ==Symbol()) bool reslt; if (str ==Long) reslt= OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(),Bid),3, clrMagenta); if (str ==Short)reslt= OrderClose(OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(),Ask),3, clrMagenta); if (reslt == false) Alert(Error Closing Order(s)); else Alert(Orders Closed Successfully); Opinion(String = ,str \n, Reslt = ,reslt \n,Open Orders = ,OrdersTotal() ); ObjectCreate (AtClose,OBJ_TEXT,0,CurrentTime, High#91;0#93; 0.0004); ObjectSetText (AtClose, Cls:,10,Calibri,clrMagenta); }