7456 vizualizações
This is a stepped trailing exit example for educational purpose.
Short brief.
There are 1 stop loss and 3 profit levels.
Short brief.
There are 1 stop loss and 3 profit levels.
- When first tp is reached we move stop loss to break-even.
- When second tp is reached we move stop loss to first tp.
- When third tp is reached we exit by profit.
Notas de Lançamento:
Stop Loss & Take Profit in %% for independence from instrument's tick size.
Notas de Lançamento:
New input `activateTrailingOnThirdStep` added.
With `activateTrailingOnThirdStep = true` when tp2 will be reached, the strategy places trailing stop with amount at tp3 level and offset at tp2 level.
By default the old behavior remains.
With `activateTrailingOnThirdStep = true` when tp2 will be reached, the strategy places trailing stop with amount at tp3 level and offset at tp2 level.
By default the old behavior remains.
Comentários
Abusing your knowledge a bit, could you do something like this in a study version and with % instead of points?
It would be magnificent.
In the name of all TradingView traders, thank you for your valuable contribution to the TradingView community, and congrats!
Too bad the "strategy" commands don't work in studies, this would be so helpfull and avoid a lot of unneccesary coding and keeping track of variables.
Good job!
Gr, JD.
it would be super usefull if the "wall" between strategies and studies would disappear.
right now studies can't keep track of trades and strategies can't launch alerts,...