The first if prevents the trailing until it is above break even. Bid- Point*Trailing stop is the new SL (buy order.)
I code it this way:
double newTSL = Bid - Point*TrailingStop; if( MathMax(OrderOpenPrice(), OrderStopLoss() ) < newTSL){ … OrderModify(… newTSL …);

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 everyone, I've found part of code below about trailing stop loss in the mql4 documentation. I'm confused about this part (Bid - open order price) and (Bid - Point*Trailing stop), what those calculation does?
Thank you.