時間足レベルの変動に基づく取引戦略
概要
本戦略はSPY市場を対象とし、時間足の価格変動を利用して市場のトレンドを判断し、短期的な逆張り取引を行う。短期取引戦略に分類される。
戦略の原理
-
5日および13日の移動平均線のクロスを使用して、時間足の価格反転を判定する。
-
RSIが50を上回っている場合、移動平均線のゴールデンクロスで買いシグナルが発生する。
-
13日移動平均線が5日移動平均線を下抜け、MACDの差離値がシグナル線を下抜けた場合に売りシグナルが発生する。
-
ストップロスとテイクプロフィットラインを設定し、目標利益の2倍に達した場合に一部ポジションを決済する。
-
空売り取引を選択可能で、今回の取引完了後に次の空売り局面に入るかどうかを判断する。
-
入力パラメーターとして、移動平均線やストップロス・テイクプロフィット比率などをカスタマイズできる。
優位性分析
-
時間足の価格変動を利用して短期取引の機会を捉える。
-
複数のインジケーターを組み合わせて検証することでシグナルの精度を高める。
-
ストップロス・テイクプロフィット戦略の設定によりリスク管理に寄与する。
-
部分的な利益確定により利益を確保できる。
-
入力パラメーターをカスタマイズできるため、短期トレーダーが調整しやすい。
リスク分析
-
時間足の価格変動により偽シグナルが発生し、損失をもたらす可能性がある。
-
ストップロス・テイクプロフィット比率の設定が不適切だと、早期停止やポジション保有期間の長期化を招く恐れがある。
-
一部の銘柄ではパラメーターの最適化・調整が必要であり、良好なバックテスト結果を得るには手間がかかる。
-
最適化の過程で過学習のリスクが存在する。
-
頻繁な取引により手数料が発生し、取引コストが増加する。
最適化の方向性
-
異なるパラメーターの組み合わせをテストし、最適なパラメーターを見つける。
-
他のインジケーターを評価し、取引シグナルの確認に活用する。
-
ストップロス・テイクプロフィット戦略を最適化し、リスクとリターンのバランスを取る。
-
トレンドフィルターを追加し、逆張り取引を回避する。
-
部分的な利益確定条件を適度に緩和し、利益獲得期間を延長する。
-
本戦略に適した他の銘柄を評価する。
まとめ
本戦略は、SPYにおける時間足の短期取引機会を捉えようとするものである。パラメーターの最適化やシグナルフィルタリングなどを通じて信頼性を高め、効果的な短期取引戦略に仕上げることができる。
//@version=5
strategy(title="SPY 1 Hour Swing Trader", initial_capital=300000, default_qty_type=strategy.percent_of_equity, default_qty_value=15, pyramiding=0, commission_type=strategy.commission.cash_per_order, commission_value=0, overlay=true, calc_on_every_tick=false, process_orders_on_close=true, max_labels_count=500)
//The purpose of this script is to spot 1 hour pivots that indicate ~5 to 6 trading day swings.
//Results indicate that swings are held approximately 5 to 6 trading days on average, over the last 6 years.
//This indicator spots a go long opportunity when the 5 ema crosses the 13 ema on the 1 hour along with the RSI > 50.
//It also spots uses a couple different means to determine when to exit the trade. Sell condition is
//primarily when the 13 ema crosses the 5 ema and the MACD line crosses below the signal line and
//the smoothed Stoichastic appears oversold (greater than 60). Stop Losses and Take Profits are configurable
//in Inputs along with ability to include short trades plus other MACD and Stoichastic settings.
//If a stop loss is encountered the trade will close. Also once twice the expected move is encountered
//partial profits will taken and stop losses and take profits will be re-established based on most recent close- 1
