この戦略は,サポートとレジスタンスを突破したトレンド追跡戦略と呼ばれる. この戦略は,重要なサポートとレジスタンスを特定し,価格がこれらのビットを突破したときにトレンドを取引する.
具体的にはこうです
周期内の最高点と最低点を計算し,キーサポート抵抗位として.
価格上昇が前日の最高サポートを突破すると,買取シグナルが生じます.
値下がりが前日の最低のサポートを突破したときに,セールシグナルが生成されます.
突破の発生後,トレンドを速やかに追跡する. 再びサポート値を下げれば,止損退出する.
この戦略の利点は,重要なサポートの抵抗点を突破するタイミングでトレンド取引を行うことです.しかし,指標の形状に注意を払う必要があります.
概して,重要なサポートのレジスタンスレベルを突破することに焦点を当てることは,よりシンプルで直感的な追跡戦略である.しかし,トレーダーは,他の技術指標を補足して確認し,適切なパラメータを調整し,戦略の両方をトレンドに利益を与え,タイムリーに損失を止めることができるようにする必要があります.
/*backtest
start: 2022-09-12 00:00:00
end: 2023-09-12 00:00:00
period: 3d
basePeriod: 1d
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/
// © Yo_adriiiiaan
//@version=4
strategy("Breakout Strategy", overlay = true, commission_type=strategy.commission.percent,commission_value=0, initial_capital = 1000, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
left = input(10)
right = input(10)
pivot_high = 0.000
pivot_low = 0.000
pivot_high := nz(pivothigh(high,left,right), pivot_high[1])
pivot_low := nz(pivotlow(low,left,right), pivot_low[1])
plot(pivot_high)
plot(pivot_low)
breakout_bull = close > pivot_high[1]
breakdown_bear = close < pivot_low[1]
barcolor(close > pivot_high[1]? color.green:close < pivot_low[1]? color.red:close < pivot_high[1]? color.orange:na)
strategy.entry("Long", strategy.long, when = breakout_bull)
strategy.close_all(when = breakdown_bear)
//strategy.entry("Short", strategy.short, when = breakdown_bear)