TradingView
ShanghaiCrypto
18 de Mar de 2019 05:47

Move Up Stops 

SPDR S&P 500 ETF TRUSTArca

Descrição

This script creates a stop loss level and then moves it up in 5% increments as prices increase.

Basically, it checks to see if the lowest low of the last 7 days is above a certain level. If yes, it sets the stop at that level. It then checks for the next highest level and keeps going until the price is not above a level. Those variables are then set to the level below them.

Trailing stops are notorious for skewing backtest results. This script avoids that problem. Also, some exchanges do not offer trailing stops, so this script gives you a signal to let you know its time to manually move your stops up.

I will be using this for swing trades involving both crypto and stocks.
Comentários
Jbenavente
Hi, how would you code a script that sets stop loss 8% below the price at any given time?
Mais