mshpun

Trailing Stops Loss V2 (Short & Long positions)

Greetings.

This is and update to my original indicator "Intraday Trailing Stop Loss".

With this update it allows you manually setup the your entry price for the trade and desired stop loss value for either long or short positions.
The trailing stop will dynamically follow the price movement if price goes into the desired direction and will not change when price goes in undesired direction.
When price will cross the indicator line, the signal will appear on chart suggesting terminate position.
It's also possible to set up a regular chart Alert based on this condition.

Example for Short position


To setup indicator click on "Settings" and enter

- Entry Price
- Position (short or long). Default is long.
- Stop loss in $. Default $0.2
- Time and Date of entry (Minute, Hour, Date, Month, Year). Indicator can span on multiple sessions.

To setup Alert.
- Right click on indicator line and select "Add Alert on ....." (first entry in list)
- Use all defaults

Due to Pine script limitations following is very important.

1. When indicator first time applied it will not show anything until all input values are entered.
2. As soon as input values are set it will appear on chart and could be adjusted further.
3. For indicator to work properly entered information should be as accurate as possible. For example if the entry price was not actually available on the time bar you using the indicator behaviour is not fully predictable.
4. Since absolute value of stop loss is used the indicator will not automatically work when you switch securities plotted on the chart. Multiple chart window can use separate indicator settings
Catatan Rilis: Small corrections
Catatan Rilis: Tags added
Hilangkan dari Skrip-Skrip Favorit Tambahkan ke Skrip-Skrip Favorit
Hi,
This is great!
I have been looking for a trailing stop loss with a date entry to start the indicator from.
I have also been looking for a volatility or ATR trailing stop loss with a date entry. I was able to add some code that allowed me to do this to your script which works on the long side but not the short side.
Would you be able to look at what I have done and see why it doesn't work on the short side? As I have pretty much zero coding experience.
Jawab
Great stuff! Thanks for sharing, buddy :)
Jawab
Hi,
Great and easy script to follow.
What would you need to change to add it to scripts to avoid manually adding the price on a study?
Thank you
Jawab
dpanday aaahopper
@aaahopper, @aaahopper, @nilux, Do you have an answer on this?
Jawab
nilux dpanday
@dpanday working on this already :)
Jawab
mshpun aaahopper
@aaahopper, That was my original intention to add entry price, date and time just with click on the chart. However due to Pine script limitations I did not find anything like this in study scripts.
It's possibly exists in strategy scripts, but I don't think it's possible to use strategy tools in study scripts.
Jawab
@mshpun, That is great that people are working on that. I am not a great programmer, just know the basics and I found this great trailing stop-loss and another open source done by "emkill2005". The second links to the trade price and is so complicated I simply can't work it.
He has done the associations necessary for price and trailing stop-loss.

Jawab
Beranda Penyaring Saham Penyaring Forex Penyaring Crypto Kalender Ekonomi Bagaimana Cara Kerjanya Fitur-Fitur Chart Harga Akun Tata Tertib Moderator Solusi Website & Broker Widget-Widget Solusi Charting Pusat Bantuan Permintaan Fitur Blog & Berita Yang Sering di Tanyakan Wiki Twitter
Profil Pengaturan Profil Akun dan Penagihan Coin TradingView Tiket Dukungan Saya Pusat Bantuan Ide Terpublikasikan Pengikut Telah Mengikuti Pesan Pribadi Obrolan Keluar