
この戦略は,株式指数の日線取引に主に適用される非常に単純なショートライン取引戦略である.これは多頭取引のみを行い,株式指数が長期上位チャネルにあり,短期的には反転シグナルが発生したときに多額のポジションを作ります.
この戦略は,主に平均線とRSI指標の判断トレンドと超買い超売り現象に基づいています. 具体的な取引シグナルは,株価指数の閉盘価格が長期200日平均線に達し,それ以上の長期トレンド判断として;閉盘価格が10日平均線を下回ると短期調整シグナルを形成し,RSI3期指標は30未満で超売りシグナルとなります. 上記の3つの条件を満たすと,短期調整の逆転の可能性が高いと考え,多額のポジションを作成します.
ポジションを確立した後,ストップ,ストップと短期トレンドの判断に基づいて平定する. 閉盘価格が10日平均線に再立ち,短期調整が終了したと判断すると,この時点で積極的なストップ; 閉盘価格が新しい低点が発生した場合,ストップ・損失退出; 閉盘価格が10%上昇するとストップする.
この戦略には以下の利点があります.
この戦略にはいくつかのリスクがあります.
上記のリスクに対して,周期パラメータの最適化,ストップストップ比率の調整,その他の指標判断の追加などの方法によって改善することができる.
この戦略は,以下のような点で最適化できます.
この戦略は,全体的に非常にシンプルで実用的なショートライン取引戦略である.これは,株価指数の長期上昇経路と短期調整逆転の組み合わせ戦略を利用し,リスクをコントロールした前提で余剰収益を手に入れることができる.継続的に最適化してパラメータをコントロールすることで,よりよい効果を得ることができる.
/*backtest
start: 2023-01-11 00:00:00
end: 2024-01-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/
// © tsujimoto0403
//@version=5
strategy("simple pull back", overlay=true,default_qty_type=strategy.percent_of_equity,
default_qty_value=100)
//input value
malongperiod=input.int(200,"長期移動平均BASE200/period of long term sma",group = "パラメータ")
mashortperiod=input.int(10,"長期移動平均BASE10/period of short term sma",group = "パラメータ")
stoprate=input.int(5,title = "損切の割合%/stoploss percentages",group = "パラメータ")
profit=input.int(20,title = "利食いの割合%/take profit percentages",group = "パラメータ")
startday=input(title="バックテストを始める日/start trade day", defval=timestamp("01 Jan 2000 13:30 +0000"), group="期間")
endday=input(title="バックテスを終わる日/finish date day", defval=timestamp("1 Jan 2099 19:30 +0000"), group="期間")
//polt indicators that we use
malong=ta.sma(close,malongperiod)
mashort=ta.sma(close,mashortperiod)
plot(malong,color=color.aqua,linewidth = 2)
plot(mashort,color=color.yellow,linewidth = 2)
//date range
datefilter = true
//open conditions
if close>malong and close<mashort and strategy.position_size == 0 and datefilter and ta.rsi(close,3)<30
strategy.entry(id="long", direction=strategy.long)
//sell conditions
strategy.exit(id="cut",from_entry="long",stop=(1-0.01*stoprate)*strategy.position_avg_price,limit=(1+0.01*profit)*strategy.position_avg_price)
if close>mashort and close<low[1] and strategy.position_size>0
strategy.close(id ="long")