Am trying to modify my trade when it hits stop loss
But I don't know how to code the condition that clearly says that
if(SymbolInfoDouble (Symbol(), SYMBOL_BID < stoploss);
That's what I tried to do
- meta editor wont modify code
- Market theory
- MQL4 Learning
You should post your complete code so we can see how you try to do this and maybe we can help then.
When your trade hits stop loss it cannot be modified anymore as it will be in the history deals,
If you want to modify the trade before hitting SL then you can assign variables for bid and ask prices and compare them with SL
If the condition meets then inside if you can use the function
Trade.positionModify()
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