日中ロングブレイクアウト戦略


作成日: 2024-03-29 16:13:30 最終変更日: 2024-03-29 16:13:30
コピー: 0 クリック数: 614
1
フォロー
1617
フォロワー

日中ロングブレイクアウト戦略

概要

この戦略は,技術指標に基づく1日間の多頭取引戦略である.主に3つの技術指標を使用して,多頭入場のタイミングを判断する:1. 波動的低点 2. のK線形 3. 極度の超売り.同時に,ATR ((Average True Range) の指標を使用して,止損とストップ価格を計算する.この戦略は,すべての周期とすべての指標に適用される.

戦略原則

この戦略は以下の原則に基づいています.

  1. 上昇傾向では,株価はしばしば反調し,局所的な低点を形成し,これらの局所的な低点はしばしば良い買い得の機会である. 戦略は,これらの買い得の機会をキャプチャするために,低点の振動を使用する.
  2. 特定のK線形状は,傾向の逆転または傾向の継続を予告する傾向があります.戦略は,反転の買い取りのタイミングを判断するために,看板三線を叩く形状を使用します.
  3. 株価が数日間連続で下落した後,空頭力が徐々に衰え,下落を続ける余地が限られ,株価はいつでも反発し,戦略は,これらの反転買い取りの機会をキャプチャするために極度の超売り指標を使用する.
  4. 株価の変動は周期性があり,類似性があり,ATR指標で測定し,それにより適切なストップ・ストラスト・ディスタンスを計算することができる.

戦略的優位性

  1. 3つの古典的な技術指標を組み合わせて,厳格な量的な取引システムを形成し,主観性の欠陥を回避します.
  2. ストップ・ストップ・ロスの設定はATRの変動率指標に基づいて,客観的に量化することができ,主観性の悪さを回避し,同時にストップ・ロスは,ターゲット価格と市場情勢の変動率にマッチし,リスクを効果的に制御し,利益をロックすることができます.
  3. 適用範囲は広く,周期や標識の制限はなく,優位性を充分に活用して利益を得ることができます.

戦略リスク

  1. 片側上の動きを判断する精度は高いが,震動の動きを遭遇すると,頻繁に入場することが損失を増加させる可能性がある.
  2. 雇用は遠すぎ,収益は遅い,資金利用率は低い.
  3. 極端な超売れ指数は逆転能力が限られており,トレンドの状況では有効でない可能性があります.

戦略最適化の方向性

  1. MA,MACDなどのトレンド判断指標を足して大きなトレンドの方向を判断し,上昇傾向でこの戦略を使用し,下降傾向で停止することを検討することができます.
  2. 最適なパラメータ,特にATR倍数の選択を考えるための最適化アルゴリズムを考慮し,止まりの倍数を小さくして,利潤の速度を加速することができる.
  3. 極端な超売れ指数は,KDJ,RSIなどのより成熟した超売れ指数に変更することで最適化できます.

要約する

この日中の多頭突破戦略は,波動的低点,看板形状,超売り反転に基づく量化取引戦略である. 3つの技術指標を使用して,多頭買点を異なる角度から捉える. 同時に,ATR波動率指標を使用して,ダイナミックストップストロスを計算する. 上昇の状況で利益を十分に捉えることができるが,揺れの状況で頻繁に取引するリスクがあります.

ストラテジーソースコード
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © LuxTradeVenture

//@version=5
strategy("Intraday Bullish Script", overlay=true, margin_long=100, margin_short=100)



// Settings for Strategy 1
entryCondition1 = input.bool(true, title="Use Entry Condition - Strategy 1")

// Input for ATR multiplier for stop loss 
atrMultiplierforstoploss = input.float(2, title="ATR Multiplier for Stop Loss")

// Input for ATR multiplier for target price
atrMultiplierforlongs = input.float(4, title="ATR Multiplier for Target Price")

// Calculate ATR
atrLength = input.int(14, title="ATR Length")
atrValue = ta.atr(atrLength)

// Swing low condition - Strategy 1
swingLow1 = low == ta.lowest(low, 12) or low[1] == ta.lowest(low, 12)


/// 
maj_qual = 6  //input(6)
maj_len = 30  //input(30)
min_qual = 5  //input(5)
min_len = 5  //input(5)

lele(qual, len) =>
    bindex = 0.0
    bindex := nz(bindex[1], 0)
    sindex = 0.0
    sindex := nz(sindex[1], 0)
    ret = 0
    if close > close[4]
        bindex := bindex + 1
        bindex
    if close < close[4]
        sindex := sindex + 1
        sindex
    if bindex > qual and close < open and high >= ta.highest(high, len)
        bindex := 0
        ret := -1
        ret
    if sindex > qual and close > open and low <= ta.lowest(low, len)
        sindex := 0
        ret := 1
        
major = lele(maj_qual, maj_len)
minor = lele(min_qual, min_len)

ExaustionLow  = major ==  1 ? 1 : 0

Bullish3LineStrike = close[3] < open[3] and close[2] < open[2] and close[1] < open[1] and close > open[1]

// Entry and Exit Logic for Strategy 2
// Create variables to track trade directions and entry prices for each strategy
var int tradeDirection1 = na

var float entryLongPrice1 = na


// Calculate entry prices for long positions - Strategy 1
if (swingLow1 or Bullish3LineStrike)
    entryLongPrice1 := close
    tradeDirection1 := 1



// Calculate target prices for long positions based on ATR - Strategy 1
targetLongPrice1 = entryLongPrice1 + (atrMultiplierforlongs * atrValue)



// Calculate stop loss prices for long positions based on entry - Strategy 1
stopLossLongPrice1 = entryLongPrice1 - (atrMultiplierforstoploss * atrValue)


// Entry conditions for Strategy 1
if (tradeDirection1 == 1 and (swingLow1 or Bullish3LineStrike))
    strategy.entry("Long - Strategy 1", strategy.long)


// Exit conditions for long positions: When price reaches or exceeds the target - Strategy 1
if (close >= targetLongPrice1)
    strategy.close("Long - Strategy 1", comment="Take Profit Hit")

// Exit conditions for long positions: When price hits stop loss - Strategy 1
if (close <= stopLossLongPrice1)
    strategy.close("Long - Strategy 1", comment="Stop Loss Hit")