JBravo 定量動向戦略

作者: リン・ハーンチャオチャン開催日:2023年12月27日 14:53:07
タグ:

戦略の概要

JBravo定量トレンド戦略は,移動平均値に基づいたトレンドフォロー戦略である.市場トレンドの方向性,最終的な買い売り信号を決定するために,9日間のシンプル移動平均値,20日間の指数的な移動平均値,および180日間のシンプル移動平均値を使用する.

戦略名は,漫画キャラクタージョニー・ブラボに触発され,自信と決定的な取引決定を表しています.

戦略原則

閉じる価格が9日間の単純な移動平均線を上回るときに購入信号が生成され,閉じる価格が20日間の指数関数移動平均線を下回るときに販売信号が生成される.

9日,20日,180日移動平均がすべて上向きで,9日移動平均が20日移動平均,20日移動平均が180日移動平均を上回っている場合,強い買い信号が生成されます.

9日,20日,180日移動平均がすべて下向きで,9日移動平均が20日移動平均を下回り,20日移動平均が180日移動平均を下回っている場合,強いセールシグナルが生成されます.

ボリューム重度の平均価格線が20日間の指数関数移動平均線を上向きに横切ると,GoGo Long信号が生成される. ボリューム重度の平均価格線が20日間の指数関数移動平均線を下向きに横切ると,Go Short信号が生成される.

利点分析

この戦略は,トレンドフォローとブレイクアウト戦略のアイデアを組み合わせます. 移動平均値は,市場のトレンドの方向性を明確に決定し,間違った取引の確率を減らすことができます. 同時に,エントリー時間を決定するためにVWAP指標を柔軟に使用し,リスクを制御し,市場の突破を促進します.

移動平均値だけを使うと比べると,この戦略には GoGo Juiceの積極的なエントリーメカニズムが加えられ, 強いトレンドでより高いリターンを得ることができます.

全体的にこの戦略は少額で安定した収益性がある.

リスク分析

この戦略はエントリー強さを高めるが,横向市場ではストップ・ロスは頻繁に引き起こすことができる.また,移動平均値自体も高い慣性を持ち,時間の価格変化に追いつけない.

これは,この戦略が実際に市場価格変動を反映しない特定の数の仮想取引を生む可能性があることを意味します. さらに,攻撃的なエントリも損失のリスクを増やすことができます.

リスクを減らすために,移動平均値のサイクルを適度に調整したり,損失が一定のレベルに達すると損失を止めるストップ・ロスのモジュールを追加したりできます.

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

戦略は以下の方向で最適化できる:

  1. 移動平均パラメータを調整し,最適なパラメータ組み合わせを見つけるためにサイクルパラメータを最適化

  2. 激烈な価格変動の時に誤った信号を避けるため,ボリューム指標を追加します.

  3. ストップ・ロスのモジュールを増やし,トレード・ロスのコントロールに脱出規則を設定する

  4. 戦略をより目標的にするために,市場熱帯部門の選択を組み合わせる

  5. 異なるパラメータのための異なるスケールを最適化

結論

JBravo定量トレンド戦略は,移動平均分析とVWAPトレンド判断を統合している.これは一定の程度積極的な取引メカニズムを持つ一方で,安定した長期利益を追求する.この戦略は,中高リスクと高いリターンを持つ中長期保有に適している.非常に良い市場適応性を持つポートフォリオ取引戦略の一部になることができる.

[/トランス]


/*backtest
start: 2022-12-20 00:00:00
end: 2023-12-26 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © bradvaughn

//@version=4
strategy("JBravo Swing", overlay = false)

var buy_in_progress = false


//Moving Averages
smaInput1 = input(title="Display SMA 9", type=input.bool, defval=true)
smaInput2 = input(title="Display EMA 20", type=input.bool, defval=true)
smaInput4 = input(title="Display SMA 180", type=input.bool, defval=true)
colored_180 = input(false, title="Color-code 180 trend direction")
vwapInput = input(title="Display VWAP", type=input.bool, defval=true)

sma9 = sma(close, 9)
ema20 = ema(close, 20)
sma180 = sma(close, 180)

//Plot Moving Averages
plot(smaInput1 ? sma9 : na, color= color.red, title="SMA 9")
plot(smaInput2 ? ema20 : na, color = color.yellow, title="EMA 20")

// Plot VWAP
vwap1 = vwap(hlc3)
plot(vwapInput ? vwap1 : na, color = color.blue, title="VWAP")
vwaplong = vwap1 > ema20
vwapshort = vwap1 < ema20

//Color SMA 180 trend direction if selected
sma180_uptrend = sma(close, 180) > sma(close[2], 180)
colr = sma180_uptrend == true or colored_180 == false ? color.white : colored_180 == true ? color.gray : na
plot(smaInput4 ? sma180 : na, color = colr, title="SMA 180")

//Get value of lower end of candle
buyLow = iff(lowest(open, 1) < lowest(close, 1), lowest(open, 1), lowest(close, 1))
sellLow = lowest(close, 1)

// Find the lower MA for crossover sell condition
sellma = iff((sma9<ema20), sma9, ema20)


//SMA 9 trend direction
sma9_uptrend = sma(close, 9) > sma(close[2], 9)
//EMA 20 trend direction
ema20_uptrend = ema(close, 20) > sma(close[2], 20)

//Buy or sell if conditions are met
// Buy when the candle low is above the SMA9
// Sell when the candle low is below the lower of SMA9 and EMA20
Buy = iff(buy_in_progress == false and buyLow > sma9 == true, true, false)
Sell = iff(buy_in_progress == true and sellLow < sellma == true, true, false)

// Determine stong buy and strong sell conditions.
// If moving averages are all up, then this will qualify a buy as a strong buy.
// If the moving averages are not up (ie. down) then this will qualify a sell as a strong sell
StrongBuy = iff (Buy and sma9_uptrend and sma180_uptrend and ema20_uptrend and (sma9 > ema20) and (ema20 > sma180), true, false)
StrongSell = iff (Sell and not sma9_uptrend and not sma180_uptrend and not ema20_uptrend and (sma9 < ema20) and (ema20 < sma180), true, false)

//Update Trading status if bought or sold
if Buy
    buy_in_progress := true
if Sell
    buy_in_progress := false
    
// Clear Buy and Sell conditions if StrongBuy or StrongSell conditions exist.  
// This disables plotting Buy and Sell conditions
if StrongBuy
    Buy := false
if StrongSell
    Sell := false
    

//Display BUY/SELL indicators

plotshape(Buy,title="Buy", color=color.green, style=shape.arrowup,location=location.belowbar, text="Buy")
plotshape(StrongBuy,title="Strong Buy", color=color.green, style=shape.arrowup,location=location.belowbar, text="Strong Buy")
plotshape(Sell,title="Sell", color=color.red, style=shape.arrowdown,text="Sell")
plotshape(StrongSell,title="Strong Sell", color=color.red, style=shape.arrowdown,text="Strong Sell")

strategy.entry("GoGo Long", strategy.long, 1, when=vwaplong and vwapInput)
strategy.entry("GoGo Short", strategy.short, 1, when=vwapshort and vwapInput)

strategy.close("GoGo Long", when = vwapshort and vwapInput)
strategy.close("GoGo Short", when = vwaplong and vwapInput)


alertcondition(Buy, title="Buy Signal", message="Buy")
alertcondition(Sell, title="Sell Signal", message="Sell")

もっと