lukatrader:
I'm looking for a script or an indicator to write down the price on the stop loss line.
any suggestions?
not nessary.
you only needs ticks-datas of (to) your broker platform.
if you resist to get a scripts,that 's the script or indicator whick store ticks.
-----the reason---------
if you buy a symbols at 1234.00 and the stoploss is 1234.50.
and tickprice (bid) jump down as 1234.99 -> 1234.00 (that meats the spread is 99pipes,althose that will not happen in real,but this not the point)
then your order will be closed(stoploss) by the price by 1234.00,the latest tickvalue.
I would assume it depends on your broker.
//example for BUY Position double profit=0; for (int cnt = 0; cnt < OrdersTotal(); cnt++) { if(OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES)){ if(OrderSymbol()==Symbol()){ if(OrdeType()==OP_BUY && OrderStopLoss()>OrderOpenPrice()){ profit = (OrderStopLoss()-OrderOpenPrice()) * OrderLots() * TickValue; showProfit(profit); } } } }
Siti Latifah:
'for' - expressions are not allowed on a global scope fydu.mq4 2 2
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
I'm looking for a script or an indicator to write down the price on the stop loss line.
any suggestions?