
この戦略は,MACD指標のパラメータを最適化して,移動平均,価格アクション,特定の取引時間と組み合わせて,高い勝利率の為替レート取引戦略を実現します.
3つのK線を用いて価格トレンドを判断する.最後の3つのK線の閉盘価格が開盘価格より高い場合,上昇傾向として判断する.最後の3つのK線の閉盘価格が開盘価格より低い場合,下降傾向として判断する.
快線,慢線,MACD差値の計算.快線パラメータは12で,慢線パラメータは26で,信号線パラメータは9である.
取引時間は毎日09:00-09:15に設定されています. この時間帯では,以下の条件を満たす場合は入場できます.
ストップオフの設定は0.3ポイントで,ストップダストの設定は100ポイントです.
午後9時~21時15分は全額無金でした.
複数の時間枠の指標の組み合わせを使用して,トレンドの方向を総合的に判断し,意思決定の正確性を向上させる.
市場が急激に波動する時に,不必要なストップ・ローズのリスクを減らすため,取引時間を最適化する.
合理的なストップ・ストラスト比率を設定し,利益を最大限にロックし,損失を拡大しないようにする.
この戦略は,全体的に,高い勝率で,短線で頻繁に取引するのに適しています.
戦略的な取引は時間的に決まっており,時間内に場内に入らないと取引の機会を逃してしまう可能性があります.
MACD指数は誤った信号を生じやすいため,明確な上下トレンドを判断できない場合は慎重に操作する.
ストップ・ストップ・ロスの数値設定は不合理であり,利益損失比率の不均衡を引き起こす可能性があり,異なる品種に応じてパラメータを調整する必要がある.
戦略的リスクは全体的に低い.しかし,高レバレッジの場合,ポジションが大きすぎると大きな損失がもたらされる.
他の指標と組み合わせてトレンドを判断し,MACDが誤信号を生じないようにする.例えば,ブリンライン,RSIなどの指標と組み合わせて組み合わせて使用する.
ストップ・ストップ・損失の比率を最適化できる.
戦略が適用される取引品種を拡張し,異なる品種のパラメータ調整効果を評価することができる.
機械学習アルゴリズムを導入し,異なる市場状況に応じて最適のパラメータを選択し,動的調整が可能である.
この戦略は,戦略の考えが明確で,パラメータの最適化スペースが広く,リスクが制御可能であるため,初心者トレーダーに適しています. ポジション開設時間をカスタマイズし,合理的な損失率を設定することにより,高い利益率を得ることができます. 戦略のパラメータの動態を調整し,より複雑な市場環境に適応させるため,さらに最適化することができます.
/*backtest
start: 2023-12-01 00:00:00
end: 2023-12-31 23:59:59
period: 1h
basePeriod: 15m
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/
// © exlux99
//@version=4
strategy("Very high win rate strategy", overlay=true)
//
fast_length =12
slow_length= 26
src = close
signal_length = 9
sma_source = false
sma_signal = false
// Calculating
fast_ma = sma_source ? sma(src, fast_length) : ema(src, fast_length)
slow_ma = sma_source ? sma(src, slow_length) : ema(src, slow_length)
macd = fast_ma - slow_ma
signal = sma_signal ? sma(macd, signal_length) : ema(macd, signal_length)
hist = macd - signal
//ma
len=10
srca = input(close, title="Source")
out = hma(srca, len)
fromDay = input(defval = 1, title = "From Day", minval = 1, maxval = 31)
fromMonth = input(defval = 1, title = "From Month", minval = 1, maxval = 12)
fromYear = input(defval = 2000, title = "From Year", minval = 1970)
//monday and session
// To Date Inputs
toDay = input(defval = 31, title = "To Day", minval = 1, maxval = 31)
toMonth = input(defval = 12, title = "To Month", minval = 1, maxval = 12)
toYear = input(defval = 2021, title = "To Year", minval = 1970)
startDate = timestamp(fromYear, fromMonth, fromDay, 00, 00)
finishDate = timestamp(toYear, toMonth, toDay, 00, 00)
time_cond = true
timeinrange(res, sess) => time(res, sess) != 0
// = input('0900-0915', type=input.session, title="My Defined Hours")
myspecifictradingtimes = '0900-0915'
exittime = '2100-2115'
optionmacd=true
entrytime = time(timeframe.period, myspecifictradingtimes) != 0
exit = time(timeframe.period, exittime) != 0
if(time_cond and optionmacd )
if(close > open and close[1] > open[1] and close[2] > open[2] and entrytime and crossover(hist,0))
strategy.entry("long",1)
if(close< open and close[1] < open[1] and close[2] < open[2] and entrytime and crossunder(hist,0))
strategy.entry("short",0)
tp = input(0.0003, title="tp")
//tp = 0.0003
sl = input(1.0 , title="sl")
//sl = 1.0
strategy.exit("closelong", "long" , profit = close * tp / syminfo.mintick, loss = close * sl / syminfo.mintick, alert_message = "closelong")
strategy.exit("closeshort", "short" , profit = close * tp / syminfo.mintick, loss = close * sl / syminfo.mintick, alert_message = "closeshort")