動力追跡取引戦略は,市場の動力を追跡する傾向を主軸として,複数の技術指標を補助判断として組み合わせる自動化取引戦略である.この戦略は,K線情報を解析して,現在の市場主力資金の方向と強さを判断し,その後,量価指標,移動平均線などの技術指標を組み合わせて取引信号を発信し,トレンド追跡を実現する.
全体として,この戦略は中長線トレンド取引に適しており,市場トレンドを効果的に捉え,取引頻度を低下させ,単一利益の追求に適しています.また,戦略パラメータを最適化すると,短線取引にも使用できます.
動力追跡戦略の核心は,市場の主力資金の方向性を判断することにある.戦略はATR指標を計算することで,市場の変動度をリアルタイムで監視する.変動が大きくなり,主力代表が蓄積または分配されているときに,戦略は一時的に市場から退いて,主力操作の時期を回避する.
波動が弱くなり,代表力が蓄積または配分が完了すると,戦略が再発し,主力の具体的な方向を判断する.判断方法は,市場のサポートプレッシャー位置を計算して,突破の兆候があるかどうかを確認する.明確な突破がある場合は,主力がその方向を選択したことを確認する.
主力方向が決定された後,戦略は,誤判を避けるために,複数の補助技術指標を再び検証するために導入します.具体的には,MACD,KDJなどの指標を計算して,主力方向と一致しているかどうかを判断します.
主力方向と補助指標の両方が同方向信号を発している場合にのみ,戦略はポジションを確立します.これは取引頻度を効果的に制御し,高い確率の場合のみで入場します.
ポジションを確立した後,動力追跡戦略は価格の変化をリアルタイムで追跡し,ATR値の拡大をストップ信号として使用する.これは,市場が再び主力操作段階に入ることを意味し,すぐに現金に退出し,被套を避ける必要があります.
また,価格が一定範囲を超えると,リコールが止まります.これは通常の技術的なリコールであり,リスク管理で即座にリコールが止まります.
動力追跡戦略の最大の優点は,高度に体系化され,規範化されていることです.取引の論理は明確で,入場と退出のたびに明確な原則と規則があり,任意の取引は発生しません.
この戦略は,ユーザが人工の介入なしに長期にわたるアプリケーションを設定できる,非常に強力な複製性を備えています.
戦略は,主力判断,補助検証,ストップラインの制定など,多層のリスク制御機構を内蔵し,非体系的なリスクを効果的に制御することができる.
具体的には,戦略は,高い確率の場合のみにポジションを開き,科学的ストップ・ローズを設定し,損失を最大限に回避します. これは,資金の安定した成長を保証します.
ショートライン戦略に比べて,動力追跡戦略のポジション保持周期は長く,毎回の利益も高い.これは戦略の全体的な利益をより安定して持続可能にする.
また,中長線トレンドを追跡する戦略は,トレンドの波動性を十分に捉えることができます.これは,大きなトレンドのトレンドで特に顕著です.
動力追跡策略は,ATRパラメータ,突破パラメータ,止損パラメータなどの多くのパラメータを伴う.これらのパラメータの間には一定の関連性があり,最適なパラメータの組み合わせを見つけるために繰り返しテストする必要があります.
パラメータが正しく配置されていない場合,取引頻度が過大またはリスク管理が不十分になる可能性があります.これは,ユーザが一定の戦略最適化経験を持つことを要求します.
戦略は主力と指標信号を判断する際に,価格の突破によって確認される.しかし,突破操作では,偽突破が起こりやすい状況があり,これは被套の確率が高くなる.
戦略の弱点である”クリティカル・ブレークスルー”の失敗は,大きな損失を招く可能性がある.
機械学習アルゴリズムは,パラメータ間の関連性を自動的に検出して,最適なパラメータの組み合わせを探します.これは人工テストよりもはるかに効率的です.
具体的には,EnvironmentError アルゴリズムを使用して,強化学習に基づく継続的に繰り返されるパラメータを使用して,戦略の利益を最大化することができる.
既存の指標の基礎に,取引量指標,資金流動指標など,より多くの補助フィルターを導入し,突破シグナルを3回または4回検証し,より高い信頼性を持つことができます.
しかし,フィルタが多すぎると,機会が逃れることもあり,フィルタリングの強さをバランスする必要があります. さらに,フィルタ自身は,関連性を避ける必要があります.
動力追跡戦略を他の戦略の組み合わせで使用すると,異なる戦略の優位性を活用して正交化を実現し,全体的な安定性を向上させることができる.
例えば,短期リバース戦略を統合して,ブレイク後にリバース取引を開くことで,より多くの利益をロックすることができます.
動力トラッキング取引戦略は,全体的に見ると,推薦すべき体系化されたトレンド追跡戦略である.取引ロジックは明確で,リスクは管理され,安定した高効率の投資リターンをユーザーにもたらすことができる.
しかし,戦略自体には固有の欠陥があり,その戦略を最大限に活用するために,ユーザがパラメータ最適化と戦略融合の能力を必要とします.全体的に,動力追跡戦略は,一定の量化基盤を持つ戦略愛好家が使用する量化製品です.
/*backtest
start: 2023-12-12 00:00:00
end: 2023-12-15 01:00:00
period: 30m
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//Created by frasmac2k Strategy credit to Alex Morris
//@version=5
strategy("Mechanical", shorttitle="MECH", overlay=true)
// Get the current date and time
currentYear = year
currentMonth = month
currentDay = dayofmonth
// Create a timestamp for the present date and time
currentTimestamp = timestamp(currentYear, currentMonth, currentDay)
// Define time interval for backtesting
dStart = input(timestamp('2023-07-01'), title='Set Start date', tooltip='Select a start date to run the script from')
// Define direction of strategy
direction = input.string('Forward',title='Direction', tooltip='Forward will go LONG on a Green anchor candle. Inverse will go short on a Green anchor candle and vice versa for Red candle', options=['Forward', 'Inverse'])
// Define the anchor hour as user input with a range of 0 to 23
anchorHour = input.int(11, title="Anchor Hour", tooltip='Set the hour to trade', minval=0, maxval=23)
// Define the take profit and stop loss in pips
takeProfitPips = input.int(10, title='Define TP Pips', tooltip='How many pips do you want to set TP. Choose a sensible value related to the instrument', minval=5)
stopLossPips = input.int(10,'Define SL Pips', tooltip='How many pips do you want to set SL. Choose a sensible value related to the instrument', minval=5)
// Define Tick size
tick10p = input.int(100, title='tick size', tooltip='Choose how many ticks equal 10 pips. This can vary by broker so measure 10 pips on the chart and select how many ticks that equates to. Forex is typically 100. Some instruments such as indices can be 1000', options=[100,1000])
// Declare TP/SL variables
var float takeProfit = na
var float stopLoss = na
// Calculate take profit and stop loss levels in ticks
if tick10p == 100
takeProfit := takeProfitPips * 10
stopLoss := stopLossPips * 10
if tick10p == 1000
takeProfit := takeProfitPips * 100
stopLoss := stopLossPips * 100
// Declare offset time
var int offset = na
if currentTimestamp > timestamp('2023-10-29')
offset := 4
else
offset := 5
//adjust for exchange time
anchorHour := anchorHour - offset
// Define the anchor hour as user input with a range of 0 to 23
tradeHour = anchorHour
// Define logical check for strategy date range
isStratTime = true
// Calculate the time condition for placing the order at the user-defined hour (start of the next hour)
isTradeTime = true
// Logic condition for forwards or inverse
isForward = direction == 'Forward'
isInverse = direction == 'Inverse'
// Declare entry condition variables
var bool longCondition = na
var bool shortCondition = na
// Declare and initialize variables for anchorCandle open and close prices
var float anchorOpen = na
var float anchorClose = na
var float tradeOpen = na
var float tradeClose = na
// Set logic by direction
if isForward
// Strategy logic
if isTradeTime and isStratTime
//Obtain candle open/close
anchorOpen := open
anchorClose := close
// Define entry conditions
longCondition := anchorClose > anchorOpen
shortCondition := anchorClose < anchorOpen
// Entry logic
if longCondition
strategy.entry("Long", strategy.long)
strategy.exit("Exit Long", from_entry="Long", profit=takeProfit, loss=stopLoss, comment_profit='TP', comment_loss='SL')
if shortCondition
strategy.entry("Short", strategy.short)
strategy.exit("Exit Short", from_entry="Short", profit=takeProfit, loss=stopLoss, comment_profit='TP', comment_loss='SL')
if isInverse
// Strategy logic
if isTradeTime and isStratTime
//Obtain candle open/close
anchorOpen := open
anchorClose := close
// Define entry conditions
shortCondition := anchorClose > anchorOpen
longCondition := anchorClose < anchorOpen
// Entry logic
if longCondition
strategy.entry("Long", strategy.long)
strategy.exit("Exit Long", from_entry="Long", profit=takeProfit, loss=stopLoss, comment_profit='TP', comment_loss='SL')
if shortCondition
strategy.entry("Short", strategy.short)
strategy.exit("Exit Short", from_entry="Short", profit=takeProfit, loss=stopLoss, comment_profit='TP', comment_loss='SL')
// Define the time range for the background shade
startHour = anchorHour
startMinute = 0
endHour = anchorHour
endMinute = 0
// Check if the current time is within the specified range
isInTimeRange = (hour == startHour and minute >= startMinute) or (hour == endHour and minute <= endMinute) or (hour > startHour and hour < endHour)
// Define the background color for the shade
backgroundColor = color.new(color.red, 90)
// Apply the background shade
bgcolor(isInTimeRange ? backgroundColor : na)