theCrypster

Percent Trailing Stop (%) - For Study Scripts

===========
Percent Trailing Stop (%) - { FOR STUDY SCRIPTS }
===========

Wow - this is an example of how to implement Alerts relating to a Trailing Stop (%) within your Study Script. It's taken a bit of effort to get this working but I think we got there!

Alerts include Open Long/Short, Trailing Stop Hit, and (the most important one) Movement of Trailing Stop! <- this is actually really quite good, by the way! :)

You can ignore the actual entry/exit orders - they're based on a simple MA cross and are therefore NOT relevant, NOT profitable and NOT recommended!

You should be using this code as a way of adding a Trailing Stop to your own scripts - hope it helps!

Set your "Open Long/Short" Alert to "Once per Bar Close" - Set your "Trailing Stop Hit" Alert to "Once per Bar" - Set your "Move TSL" Alert to "Once per Bar Close". - You're all done! Enjoy.

-----------

Good Luck and Happy Trading!
Phát hành các Ghi chú: UPDATE - Added "plot numbers" instead of plot names to give Alerts more consistent values when triggered.
Gỡ bỏ khỏi Script Ưa thích Thêm vào Script Ưa thích
==============
https://www.theCrypster.com
-----------
> Full Access on our website. 7-Day Free Trial. Crypto Tipster & Crypto Scalper Strategies. Stunning Past Performance
-----------
https://twitter.com/TCrypster
==============

Bình luận

Also, how come the shorts and longs trigger without a close a lot of the time?
Phản hồi
Hey, I like these. Curious, what is the point of the move TSL?
Phản hồi
I think there is a issue as it only takes closing price of the candle and ignores wicks. So if the wick is quite large, there will be even higher discrepancy from the set %.
Phản hồi
theCrypster Supernova432
@Supernova432, Hey Supernova - thanks for getting in touch.

If I understand you correctly, it's actually designed to ignore wicks as you'd want your SL line to mimic close prices - not the high/low (wicks).

If we included wicks in the SL formula (instead of close price) you could end up with an SL price higher (assuming you're Long) than the bar close price, which would end up with confusion whether trading manually or (more importantly) through an auto trading bot.

Let us know if we understood your comment correctly! :)
Phản hồi
Supernova432 theCrypster
@theCrypster, thankyou for the clarification. What if you plot the stoploss line after you have confirmed the candle close (using one of the tradingview functions) and once confirmed you can calculate using highest/lowest function the exact price for the stoploss line including the wicks. This will make script more accurate in my opinion, cheers
Phản hồi
theCrypster Supernova432
@Supernova432, Aah! I think I understand now - we've actually included a similar (if not the same!) SL format as the one you've mentioned within our Crypto Tipster strategy.

It looks back a certain period (defined by the user) to find the HL's from that pre-defined range, and places the SL at that high or low. We've then added a % offset to this HL price, so you can tweak and adjust the HL stop by a certain % up or down to suit your needs/requirements.

I'm not going to be publishing this script for public access. But given the info ^ you should be able to write that code for yourself!

All the best
theCrypster
Phản hồi
Trang chủ Bộ lọc cổ phiếu Bộ lọc Forex Bộ lọc Tiền điện tử Lịch kinh tế Cách thức hoạt động Tính năng Biểu đồ Trả phí Giới thiệu bạn Quy tắc Áp dụng Trung tâm Trợ giúp Giải pháp cho Website & Nhà môi giới Widget Giải pháp biểu đồ Thư viện Biểu đồ Lightweight Blog & Tin tức Twitter
Hồ sơ Tùy chỉnh Hồ sơ Tài khoản và Thanh toán Giới thiệu bạn Xu Ticket Hỗ trợ của tôi Trung tâm Trợ giúp Các ý tưởng đã đăng Người theo dõi Đang theo dõi Tin nhắn riêng Trò chuyện Đăng xuất