https://docs.mql4.com/trading OrderSelect() then OrderStopLoss()
for(int iPos = OrdersTotal()-1; iPos >= 0 ; iPos--) if ( OrderSelect(iPos, SELECT_BY_POS) // Only my orders w/ && OrderMagicNumber() == magic.number // my magic number && OrderSymbol() == Symbol() // and my pair. ){ :

Hello ;
thank you but I would like for example to get the value of stop loss on the current chart like (EUR/USD) . if we suppose that there are a lot of order how to get the value of stoploss of the current chart that we see
I try to make a code like this
if(OrderSelect(???,SELECT_BY_POS)==true) { etatstop= CreerObjet("label_stop",OrderStopLoss(),339,1,Red); if ( etatstop==0) { Print("error: can't create label_object! code #",GetLastError()); } } and I don't know about the index that we put in OrderSelect .
I mean is it possible to get just the value of stoploss of the current chart for example like Moving average
when we write
iMA(NULL,0,13,8,MODE_SMMA,PRICE_MEDIAN,i);
with NULL and 0 as a parameter it shows for all currecies and all time frame
for(...) if (OrderSymbol() == Symbol()) //only your symbol
thanks I understand your code

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
Hello ;
for example for the profit : we use :
AccountProfit();
but I don't know ho to get the level of stop Loss and Take Profit ??
thanks