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.
お気に入りスクリプトからの削除 お気に入りスクリプトに追加
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..
返信
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.
返信
Do NOT use `security` function. Period. No repaints.
返信
NikhilGuptab4 NikhilGuptab4
@NikhilGuptab4, if you need to access higher timeframes - create the calculations yourself.
返信
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
返信
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 ?
返信
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.
返信
ホーム 株式スクリーナー FXスクリーナー 仮想通貨スクリーナー 経済指標カレンダー 使い方 チャート機能 価格 ハウスルール モデレーター ウェブサイト&ブローカー向けソリューション ウィジェット チャートソリューション ヘルプセンター 機能リクエスト ブログ&ニュース よくあるご質問 ウィキ ツイッター
プロフィール プロフィール設定 アカウントとお支払い TradingView コイン マイサポートチケット ヘルプセンター 公開したアイデア フォロワー フォロー中 プライベートメッセージ チャット サインアウト