OPEN-SOURCE SCRIPT
Telah dikemas kini 'last red low / last green high' exit

This is a good alternative to pivot points and ma lines to find long and short exit points (stop loss prices) for a trade.
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
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.
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
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
Nota Keluaran
Fixed an issue where the distance to exit % was not using the input.Changed the default to 0.5
Nota Keluaran
Changed line typeremoved stuff from the cart.
Nota Keluaran
Fix error converting the change required to switch to a new recent low/highAlso added input for that threshold
Nota Keluaran
Removed a debug plot because I'm an idiotNota Keluaran
Added the ability to show or hide long or short lines.Nota Keluaran
Removed an unreasonable offsetNota Keluaran
added a change filter for the plot to make the chart clearerSkrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.