cyberfunk

[Prod] SuperTrend with Stoploss+TrendZones - 1H

Here, i'm using a SuperTrend (difference of moving averages) crossover strategy hybrid with stop-loss and trend-following to look at backtesting for the BCHUSD pair on the coinbase (GDAX) exchange.

Included in this script I've got some optimized parameters that seem to make a decent profit over ~35+ trades. The one thing that's bothering me here is that I get OCCASIONAL repaint issues with back-testing, but I can't figure out why for the life of me, because i'm using V3 in the start of the script. If someone could point out the mistake I may be making here , I feel like this could be a serious strategy to use against the BCHUSD pair on coinbase or other exchanges (with tuning of course).

I based this script off of with lots of modifications.
Gỡ bỏ khỏi Script Ưa thích Thêm vào Script Ưa thích
Without using the security function, it doesnt seem possible to calculate my strategy on the proper DEMA timescale.. which sort of undermines the whole point. PineScript 3 was supposed to have fixed this problem.. but it seems like it has not somehow..
Phản hồi
Also, let me know once you have fixed this and you still see the profits you are seeing - I have improvements to share - if you would so like.
Phản hồi
Do NOT use `security` function. Period. No repaints.
Phản hồi
NikhilGuptab4 NikhilGuptab4
@NikhilGuptab4, if you need to access higher timeframes - create the calculations yourself.
Phản hồi
Note: Here's a link that demonstrates that a repainting problem is occurring in the DEMA lines.. even though it shouldn't be. This is the problem i'm trying to solve: https://imgur.com/a/KxBSI
Phản hồi
P.S. I've commented the code reasonably heavily. I believe that the problem may lie in the Securities/EMA function based on some careful watching i've done... as it's the only one that could have an issue like this.

I would also appreciate any comments from traders who might know how to optimize gains during uptrends, which this long-only strategy seems to have trouble with, even with detection of up/down trends. It's possible that a completely different strategy should be applied during uptrends vs downtrends and that the DEMA+stoploss strategy that works for general downtrends and sideways markets is poor for uptrends.

Ideas for improvement ?
Phản hồi
If anyone knows how to troubleshoot potential backtesting / repainting issues with V3 of pine script here, I'd love a hand. I can't seem to figure it out.
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 đồ Giá Quy tắc Áp dụng Người điều hành Giải pháp cho Website & Nhà môi giới Widget Giải pháp biểu đồ Nhận trợ giúp Yêu cầu tính năng Blog & Tin tức Câu hỏi thường gặp Wiki Twitter
Hồ sơ Tùy chỉnh Hồ sơ Tài khoản và Thanh toán Nhận 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