There are no default option that I'm aware of. You'll want to code an Indicator or something which creates the objects for you.
redart:
Any way to add a marker/arrow at the exit point ?
Write the code to do it.Any way to add a marker/arrow at the exit point ?
static datetime lastClose; datetime lastClosePrev = lastClose; for(int iPos=0; iPos < OrdersHistoryTotal(); iPos++) if ( OrderSelect(iPos, SELECT_BY_POS, MODE_HISTORY) // Only orders w/ && OrderCloseTime() > lastClosePrev // not yet processed, && OrderMagicNumber() == magic.number // my magic number && OrderSymbol() == Symbol() // and my pair. && OrderType() <= OP_SELL // Avoid cr/bal forum.mql4.com/32363#325360 ){ lastClose = OrderCloseTime(); draw your arrow
WHRoeder:
Write the code to do it.
add OrderClosePrice() 2
Write the code to do it.
Thanks for the replies guys. Got it done using the OrdersTotal function in an Indicator as follows :-
if (OrdersTotal() == 0) ObjectCreate("exit", OBJ_ARROW,0,Time[0],Bid); ObjectSet("exit", OBJPROP_ARROWCODE, 3); return(0);
redart:
wrong
Thanks for the replies guys. Got it done using the OrdersTotal function in an Indicator as follows :-
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
HI,
Looking for a way to have MT4 draw an arrow on the chart when you exit a trade via the Terminal window. If the exit is via an EA then the ObjectCreate function will achieve this, but what if I want to exit the trade manually ?. Any way to add a marker/arrow at the exit point ?
Thanks.