Unisciti alla nostra fan page
TrailingStop - sistema esperto per MetaTrader 5
- Visualizzazioni:
- 8206
- Valutazioni:
- Pubblicato:
- 2017.03.02 09:54
- Hai bisogno di un robot o indicatore basato su questo codice? Ordinalo su Freelance Vai a Freelance
This is a simple Expert Advisor with an implemented trailing stop.
It has only two parameters:
TrailingStop — the distance between the price and the Stop Loss level.
TrailingStep — protection against to frequent modification of position.
How TrailingStop works — the example of the Buy position:
Originally the StopLoss of a position is equal to zero, we wait for the following condition to be met
— i.e. when the Bid minus TrailingStop is greater than the position open price PriceOpen:
StopLoss is moved to the PriceOpen level (position open price):
now, when the position has StopLoss (i.e. when StopLoss is not equal to zero), wait for the following condition to be met:
— i.e. when the Bid minus TrailingStop minus TrailingStep is greater than the StopLoss price: So here we need to additionally check TrailingStep — this prevent position modification on every tick:
StopLoss is then moved to Bid minus TrailingStop:
Here is why we need a protection in the form of TrailingStep:
Tradotto dal russo da MetaQuotes Ltd.
Codice originale https://www.mql5.com/ru/code/17263
An example of working with the trading history on Hedge accounts — reconstruction of positions.
BIG DOGThe EA places pending stop orders BUY_STOP and SELL_STOP.
The EA works based on the analysis of Open, High and Low.
NRTR GATORDerived from the NRTR indicator, provided with a new visual display.