この戦略の主な構想は,月曜日の閉店前に購入し,ストップ・ロスを設定し,次の火曜日の閉店前にストップ・ロスを停止または退出する.短線取引戦略に属する.
この戦略は2つの判断に基づいています.
判断: 閉店まで1時間未満の月曜日なので,追加入場してください.
退出判断:今火曜日で,閉店まで1時間未満で,平仓退出.
ストップポイントは入場価格*(1-ストップ・パーセンテージ) ストップポイントは入場価格*ストップ・パーセンテージ
ストップ・ロスト・ストップが触発されていない場合は,次の週の火曜日の閉店前にストップ・ストップを強制的に退出させる.
この戦略の利点は以下の通りです.
周期が短く,回転が速い.
明確な入場・出場ルールがある
危険をコントロールする Stop Loss Stop ポイントを設定します.
月曜の閉店前と火曜の閉店前のトレンド効果を利用して,利益の確率を高めること.
この戦略の主なリスクは
市場の状況に適応できず 失敗しやすい.
大規模なトレンドを考慮しない Direction,逆向きの取引の可能性.
ストップダメージポイントは不合理に設定され,過度に緩やかまたは過度に狭いかもしれません.
交易品種の特性を考慮せずに,盲目取引である.
ウェブのコンテンツを活用して,
大規模なトレンド指数と組み合わせて逆転取引を避ける.
ストップダストストップ比率を最適化して,最適なパラメータを見つけます.
変動率や取引回数などの品種特性を考慮する.
取引量突破や散布指標などの条件を追加することで,フィルタリング効果が向上します.
異なる品種のパラメータの強さをテストし,戦略の安定性をチェックする.
この戦略は全体的に短線周期取引戦略に属し,一定の優位性があるが,改善の余地もある.パラメータ最適化,条件最適化,大レベルトレンドと組み合わせることで,利益の確率をさらに向上させることができる.しかし,全体的に言えば,短期取引戦略に属し,被套のリスクを完全に回避することはできず,投資家が慎重に使用する必要がある.
/*backtest
start: 2022-09-12 00:00:00
end: 2023-02-17 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/
// © processingclouds
// @description Strategy to go long at end of Monday and exit by Tuesday close, or at stop loss or take profit percentages
//@version=5
strategy("Buy Monday, Exit Tuesday", "Mon-Tue Swings",overlay=true)
// ----- Inputs: stoploss %, takeProfit %
stopLossPercentage = input.float(defval=4.0, title='StopLoss %', minval=0.1, step=0.2) / 100
takeProfit = input.float(defval=3.0, title='Take Profit %', minval=0.3, step=0.2) / 100
// ----- Exit and Entry Conditions - Check current day and session time
isLong = dayofweek == dayofweek.monday and not na(time(timeframe.period, "1400-1601"))
isExit = dayofweek == dayofweek.tuesday and not na(time(timeframe.period, "1400-1601"))
// ----- Calculate Stoploss and Take Profit values
SL = strategy.position_avg_price * (1 - stopLossPercentage)
TP = strategy.position_avg_price * (1 + takeProfit)
// ----- Strategy Enter, and exit when conditions are met
strategy.entry("Enter Long", strategy.long, when=isLong)
if strategy.position_size > 0
strategy.close("Enter Long", isExit)
strategy.exit(id="Exit", stop=SL, limit=TP)
// ----- Plot Stoploss and TakeProfit lines
plot(strategy.position_size > 0 ? SL : na, style=plot.style_linebr, color=color.red, linewidth=2, title="StopLoss")
plot(strategy.position_size > 0 ? TP : na, style=plot.style_linebr, color=color.green, linewidth=2, title="TakeProfit")