トレンドトラッキングに基づくモメンタム・トレード戦略

作者: リン・ハーンチャオチャン, 日付: 2023-11-02 13:59:20
タグ:

img

概要

この戦略は,モメントインジケーターRSIとトレンドトラッキングストップ損失インジケーターSuperTrendをベースに,中長期・長期モメントトレード戦略を設計する.この戦略は,主に株式価格のトレンドモメントを特定し,主要なリトレースの可能性を減らすためにストップ損失で利益をロックするために使用されます.

原則

  1. RSI を使って株式価格の動向を特定する

    RSI インディケーターは,株価の動向を効果的に特定することができます.RSI 60を超える値は,株が強い上昇傾向にあることを示し,RSI 40以下の値は,株が下落傾向にあることを示し,過剰販売領域です.

    この戦略は,RSIが60を超えると 買い信号を生成し, 上向きの勢いが株価に示され,買えることを示します.

  2. トレンドトラッキングのストップ・ロスのために SuperTrend を使用します.

    スーパートレンド (SuperTrend) は,トレンド追跡ストップロスの指標で,ATRと価格自体に基づいて動的ストップロスの線を計算する.価格がこのストップロスの線を突破すると,トレンド逆転を示します.したがって,現在のポジションは停止する必要があります.

    この戦略は,スーパートレンド指標によって計算されたストップ・ロスを戦略のストップ・ロスとして使用します.価格がストップ・ロスを突破すると,ポジションは直ちに閉鎖されます.

利点

  1. トレンドの勢いを特定し,勢いから利益を得る

    株価の動向を効果的に特定できるので 傾向の初期段階に入ることができますし 潜在的利益の余地も大きくなります

  2. ストップ損失 リスク制御 利益のロック

    スーパートレンド指標のストップ・ロスの線を通して,過剰な引き下げを避けるために,時間をかけてストップ・ロスを止めることができます.また,トレンドが進むにつれて利益をロックするために,徐々にストップ・ロスを引き上げることができます.

  3. シンプルで明確な戦略論理

    この戦略は2つの指標の組み合わせを使用し,それぞれが明確な意味を持ち,戦略の論理は単純で明確で,理解し検証が容易です.

リスク

  1. 誤ったブレイクによって引き起こすストップ損失

    収束期間の間,価格が短期の誤ったブレイクに続き,急激な引き下がりがある可能性があります.これはストップ・ロスの線を誘発し,不必要な損失を引き起こす可能性があります.

  2. 業績はより広い市場と相関する

    この戦略は,株の傾向勢いを特定するので,その業績は,より広範な市場と一定程度相関する.市場が調整されると,戦略は追加の損失を生む可能性があります.

  3. 傾向の逆転を特定できなかった

    この戦略は,トレンドを特定し追跡することに重点を置くが,トレンド逆転を効果的に特定することはできません.突然のトレンド逆転の場合,戦略は時間の損失を止めることができず,より大きな損失につながる可能性があります.

オプティマイゼーションの方向性

  1. より高い精度のために RSI パラメータを最適化

    傾向識別におけるRSIの精度を向上させる最適な組み合わせを見つけるために,異なるRSIパラメータをテストする.

  2. ストップ・ロスの率を下げるためにストップ・ロスの戦略を最適化

    ストップ・ロスの方法が違うのを試す.例えば,退場前にしばらく待つなど,高周波の偽ブレイクでストップされるのを避ける.

  3. トレンド逆転信号を追加

    MACD のような指標を追加して 傾向の逆転を早期に特定し 強い傾向の逆転後に大きな損失を回避することを検討してください

  4. 適切なヘッジを検討する

    重要な市場調整の際には,戦略の市場相関を減らすために適切なヘジングコンボを追加することができます.

概要

この戦略は,RSIを使用してトレンドモメンタムを特定し,スーパートレンドを使用してトレンドトラッキングストップロスをする2つの主要な要素を持つシンプルで実践的な中長期モメンタム戦略を構築する.この戦略は,ストップロスを使ってリスクを制御しながら,トレンドを効果的に追跡することができます.パラメータを最適化し,逆転信号を追加することによってさらなる改善を行うことができます.全体として,この戦略は強力な実用性を持っています.


/*backtest
start: 2023-10-02 00:00:00
end: 2023-11-01 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
//
// ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 
//  -----------------------------------------------------------------------------
//  Copyright 2021 Amey Tavkar
//  Momentum Trading Strategy (Weekly Chart) script may be freely distributed under the MIT license.
//
//  Permission is hereby granted, free of charge, 
//  to any person obtaining a copy of this software and associated documentation files (the "Software"), 
//  to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, 
//  publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 
//  subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
//  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
//  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//  -----------------------------------------------------------------------------
//
//  Description
//  ===========
//  The strategy will open position when there is momentum in the stock
//  The strategy will ride up your stop loss based on the super trend.
//  The strategy will close your operation when the market price crossed the stop loss.
//  The strategy will close operation when the line based on the volatility will crossed
//
//  
//  -----------------------------------------------------------------------------
//  Disclaimer:
//    1. I am not licensed financial advisors or broker dealers. I do not tell you 
//       when or what to buy or sell. I developed this software which enables you 
//       execute manual or automated trades multplierFactoriplierFactoriple trades using TradingView. The 
//       software allows you to set the criteria you want for entering and exiting 
//       trades.
//    2. Do not trade with money you cannot afford to lose.
//    3. I do not guarantee consistent profits or that anyone can make money with no 
//       effort. And I am not selling the holy grail.
//    4. Every system can have winning and losing streaks.
//    5. Money management plays a large role in the results of your trading. For 
//       example: lot size, account size, broker leverage, and broker margin call 
//       rules all have an effect on results. Also, your Take Profit and Stop Loss 
//       settings for individual pair trades and for overall account equity have a 
//       major impact on results. If you are new to trading and do not understand 
//       these items, then I recommend you seek education materials to further your
//       knowledge.
//
//    YOU NEED TO FIND AND USE THE TRADING SYSTEM THAT WORKS BEST FOR YOU AND YOUR 
//    TRADING TOLERANCE.
//
//    I HAVE PROVIDED NOTHING MORE THAN A TOOL WITH OPTIONS FOR YOU TO TRADE WITH THIS PROGRAM ON TRADINGVIEW.
//    
//    I accept suggestions to improve the script.
//    If you encounter any problems I will be happy to share with me.
//  -----------------------------------------------------------------------------
//
// ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
strategy("Momentum Trading Strategy (Weekly Chart)", precision = 2, overlay = true, default_qty_type = strategy.percent_of_equity, default_qty_value = 10)

//Entry
[fastSupertrend, fastSupertrendDir]  = supertrend(5, 1)
rsi = rsi(close, 14)
entry = close > fastSupertrend and rsi > 60
strategy.entry("Long", strategy.long, when = entry)
plotshape(entry and strategy.opentrades == 0,color=color.green,text="Buy",location=location.belowbar,style=shape.labelup,textcolor=color.white, size = size.normal)
plot(fastSupertrendDir == -1 and strategy.opentrades == 1  ? fastSupertrend : na, title="Active Trade", style=plot.style_linebr, linewidth=2, color=color.blue)

//Exit
exit = close < fastSupertrend
strategy.close("Long", when = exit)
plotshape(exit and strategy.opentrades == 1,color=color.red,text="Sell",style=shape.labeldown,textcolor=color.white, size=size.normal)

もっと