検証さんのYoutube動画を参考にしたFX手法を検証してみたら強かった
元動画 【100回検証】5分足スキャルピングにASCTrendで挑戦 [FX]
手法の詳細
通貨ペア ドル円5分足
ASCtrendの矢印が描画されたときにblackflagが緑ならBUY、赤ならSELL
imacdがレンジを示していない場合にエントリーする
決済方法が 直近高値安値に(前回のローソク足の高値安値) RR1:1.5
コードを公開したので参考にどぞ
[検証さん] 5分足スキャルピングにASCTrendで挑戦ストラテジー https://jp.tradingview.com/script/Cmf...
[検証さん] 5分足スキャルピングにASCTrendで挑戦インジケーター https://jp.tradingview.com/script/jS7...
[検証さん]ASCTrend https://jp.tradingview.com/script/urN...
[検証さん]Blackflag FTS https://jp.tradingview.com/script/ARS...
[検証さん]Impulse MACD https://jp.tradingview.com/script/qkh...
//@version=5
strategy('[検証さん] 5分足スキャルピングにASCTrendで挑戦ストラテジー', overlay=true, default_qty_type=strategy.fixed, default_qty_value=1)
// Inputs for ASC Trend
eternalfg = input(false, title='eternal 確定')
eternal = eternalfg ? 1 : 0
ASClength = input.int(title='ASC Length', minval=4, defval=10)
RISK = input.int(title='RISK', minval=0, defval=3)
// Inputs for Blackflag FTS
trailType = input.string('modified', 'Trailtype', options=['modified', 'unmodified'])
ATRPeriod = input(28, 'ATR Period')
ATRFactor = input(5, 'ATR Factor')
// ASC Trend Calculations...
x1 = 67 + RISK
x2 = 33 - RISK
Range = ta.highest(ASClength) - ta.lowest(ASClength)
AvgRange = ta.sma(Range, ASClength)
CountFg = math.abs(open - close) >= AvgRange * 2.0 ? 1 : 0
TrueCount = math.sum(CountFg, ASClength)
CountFg2 = math.abs(close[3] - close) >= AvgRange * 4.6 ? 1 : 0
TrueCount2 = math.sum(CountFg2, ASClength - 3)
wpr3RR = ta.wpr(3 + RISK + RISK)
wpr3 = ta.wpr(3)
wpr4 = ta.wpr(4)
WprAbs = 100 + (TrueCount2 > 0 ? wpr4 : TrueCount > 0 ? wpr3 : wpr3RR)
ASC_Trend = 0
ASC_Trend := WprAbs[eternal] < x2[eternal] ? -1 : WprAbs[eternal] > x1[eternal] ? 1 : ASC_Trend[1]
// Blackflag FTS Calculations...
norm_o = request.security(ticker.new(syminfo.prefix, syminfo.ticker), timeframe.period, open)
norm_h = request.security(ticker.new(syminfo.prefix, syminfo.ticker), timeframe.period, high)
norm_l = request.security(ticker.new(syminfo.prefix, syminfo.ticker), timeframe.period, low)
norm_c = request.security(ticker.new(syminfo.prefix, syminfo.ticker), timeframe.period, close)
Wild_ma(_src, _malength) =>
_wild = 0.0
_wild := nz(_wild[1]) + (_src - nz(_wild[1])) / _malength
_wild
HiLo = math.min(norm_h - norm_l, 1.5 * nz(ta.sma(norm_h - norm_l, ATRPeriod)))
HRef = norm_l <= norm_h[1] ? norm_h - norm_c[1] : norm_h - norm_c[1] - 0.5 * (norm_l - norm_h[1])
LRef = norm_h >= norm_l[1] ? norm_c[1] - norm_l : norm_c[1] - norm_l - 0.5 * (norm_l[1] - norm_h)
trueRange = trailType == 'modified' ? math.max(HiLo, HRef, LRef) : math.max(norm_h - norm_l, math.abs(norm_h - norm_c[1]), math.abs(norm_l - norm_c[1]))
loss = ATRFactor * Wild_ma(trueRange, ATRPeriod)
Up = norm_c - loss
Dn = norm_c + loss
TrendUp = Up
TrendDown = Dn
Trend = 1
TrendUp := norm_c[1] > TrendUp[1] ? math.max(Up, TrendUp[1]) : Up
TrendDown := norm_c[1] < TrendDown[1] ? math.min(Dn, TrendDown[1]) : Dn
Trend := norm_c > TrendDown[1] ? 1 : norm_c < TrendUp[1] ? -1 : nz(Trend[1], 1)
trail = Trend == 1 ? TrendUp : TrendDown
macdLine = ta.ema(close, 12) - ta.ema(close, 26)
signalLine = ta.ema(macdLine, 9)
histogram = macdLine - signalLine
sb = histogram // This is your Impulse MACD histogram value
// Define the threshold for the Impulse MACD signal (sikiti)
sikiti = input(0.02, title='Impulse MACD Threshold')
// Combine all conditions and plot the buy/sell signals
ConditionForSignal = sb <= sikiti and sb >= -sikiti
// Signal conditions
longCondition = ta.crossover(ASC_Trend, 0) and Trend == 1 and not ConditionForSignal
shortCondition = ta.crossunder(ASC_Trend, 0) and Trend == -1 and not ConditionForSignal
// Calculate stop loss and take profit levels
stopLossLong = low[1]
takeProfitLong = close + (close - stopLossLong) * 1.5
stopLossShort = high[1]
takeProfitShort = close - (stopLossShort - close) * 1.5
// Execute long strategy
if (longCondition)
strategy.entry("Long", strategy.long)
strategy.exit("Take Profit Long", "Long", limit=takeProfitLong, stop=stopLossLong)
// Execute short strategy
if (shortCondition)
strategy.entry("Short", strategy.short)
strategy.exit("Take Profit Short", "Short", limit=takeProfitShort, stop=stopLossShort)
よろしければサポートお願いします! いただいたサポートはクリエイターとしての活動費に使わせていただきます!