'last red low / last green high' exit

When you hear traders say "set the stop loss to the recent swing", this indicator seems to do a reasonable job of finding those.
This script marks
- the low of the most recent red candle
- the high of the most recent green candle
in order to help identify a reasonable stop loss exit point for long and short trades.
You can also specify a distance threshold to the stop loss point.
How to use it.
- Decide how far from the current price the exit should be (default 1.5%)
- Use your chosen trading strategy to identify a long or short entry position
- Add a long/short drawing to the close of the trade candle
- Set the stop loos of your drawing to the exit line of this indicator
- Set the take profit of your drawing using the desired risk to reward ratio
Note: A good rule is that if this indicator does not show a valid exit line, do not enter the trade.
Note: If the change of a new "last Green High" or the "last Red Low" is below 0.5%, the indicator will keep the previous values
Changed the default to 0.5
removed stuff from the cart.
Also added input for that threshold
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.
Declinazione di responsabilità
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.