बीबी-आरएसआई-एडीएक्स प्रवेश बिंदु

लेखक:चाओझांग, दिनांकः 2022-05-11 12:38:22
टैगःstdevएसएमए

यह संकेतकों का एक संयोजन है जिसका उपयोग संभावित प्रतिवर्तन के लिए ओवरसोल्ड और ओवरबॉट प्रवेश बिंदुओं को खोजने के लिए किया जाता है।

एक हरे रंग का तीर तब दिखाई देगा जब ENTER LONG स्थिति के लिए सभी शर्तें पूरी हो जाएंगी. जब ENTER SHORT स्थिति के लिए सभी शर्तें पूरी हो जाएंगी तो एक लाल रेखा दिखाई देगी।

आप संकेतक की सेटिंग्स से इन सभी शर्त पैरामीटर को संशोधित कर सकते हैं।

संकेतक कैसे काम करता है सिग्नल बोलिंगर बैंड्स, बीबी %बी, आरएसआई और एडीएक्स संकेतकों का उपयोग कर रहे हैं और उलटफेर के बिंदुओं को खोजने की कोशिश कर रहे हैं

लम्बी शर्तें दर्ज करें वर्तमान मोमबत्ती कम बीबी निचले बैंड से नीचे है। बीबी %बी 0 से अधिक है। आरएसआई > 30 ADX > 25

SHORT शर्तें दर्ज करें वर्तमान मोमबत्ती उच्च बीबी ऊपरी बैंड के ऊपर है। बीबी %बी 1 से कम है। आरएसआई < 70 ADX > 25

ये डिफ़ॉल्ट सेटिंग्स हैं जो मेरे लिए काम करती हैं लेकिन आप इन सभी को इंडिकेटर सेटिंग्स से अनुकूलित कर सकते हैं। मुझे लगता है कि यह रणनीति 3 मिनट की समय सीमा पर सबसे अच्छा काम करता है

नोटः bb %B की गणना stDev - 1 के लिए की गई है। इससे आपको परिवर्तन को तेजी से देखने में मदद मिलेगी।

बैकटेस्ट

img


/*backtest
start: 2022-04-10 00:00:00
end: 2022-05-09 23:59:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
indicator(shorttitle="BB-RSI-ADX", title="BB-RSI-ADX Entry Points", overlay=true, timeframe="", timeframe_gaps=true)

// Bollinger Bands Setup
bbLength = input.int(9, minval=1, title="BB Length", group="BB Settings")
src = input(close, title="Source", group="BB Settings")
stDev = input.float(2.0, minval=0.001, maxval=50, title="StdDev", group="BB Settings")
basis = ta.sma(src, bbLength)
dev = stDev * ta.stdev(src, bbLength)
devMinOne = (stDev > 1 ? stDev - 1 : 1) * ta.stdev(src, bbLength)
upper = basis + dev
lower = basis - dev
upperMinOne = basis + devMinOne
lowerMinOne = basis - devMinOne

plot(basis, "Basis", color=#FF6D00)
p1 = plot(upper, "BB  Upper", color=#2962FF)
p2 = plot(lower, "BB Lower", color=#2962FF)
fill(p1, p2, title = "BB Background", color=color.rgb(33, 150, 243, 95))

// BB width %B
bbr = (src - lowerMinOne)/(upperMinOne - lowerMinOne)

// RSI
rsiLengthInput = input.int(14, minval=1, title="RSI Length", group="RSI Settings")
rsiSourceInput = input.source(close, "Source", group="RSI Settings")
rsiUp = ta.rma(math.max(ta.change(rsiSourceInput), 0), rsiLengthInput)
rsiDown = ta.rma(-math.min(ta.change(rsiSourceInput), 0), rsiLengthInput)
rsi = rsiDown == 0 ? 100 : rsiUp == 0 ? 0 : 100 - (100 / (1 + rsiUp / rsiDown))

// ADX
adxlen = input(14, title="ADX Smoothing", group="ADX Settings")
dilen = input(14, title="ADX DI Length", group="ADX Settings")
dirmov(len) =>
	up = ta.change(high)
	down = -ta.change(low)
	plusDM = na(up) ? na : (up > down and up > 0 ? up : 0)
	minusDM = na(down) ? na : (down > up and down > 0 ? down : 0)
	truerange = ta.rma(ta.tr, len)
	plus = fixnan(100 * ta.rma(plusDM, len) / truerange)
	minus = fixnan(100 * ta.rma(minusDM, len) / truerange)
	[plus, minus]
adx(dilen, adxlen) =>
	[plus, minus] = dirmov(dilen)
	sum = plus + minus
	adx = 100 * ta.rma(math.abs(plus - minus) / (sum == 0 ? 1 : sum), adxlen)
adxStr = adx(dilen, adxlen)

// Entry condition inputs
c_enter_long_bbr = input(0, title="Minimum BB %B", group="Enter LONG Conditions", tooltip="The Minimum required BB %B required to enter a LONG position. RECOMMENDED: 0")
c_enter_long_rsi_min = input(30, title="MIN RSI", group="Enter LONG Conditions", tooltip="The Minimum RSI value to enter a LONG position. RECOMMENDED: 30", inline="rsi_long")
c_enter_long_rsi_max = input(50, title="MAX RSI", group="Enter LONG Conditions", tooltip="The Maximum RSI value to enter a LONG position. RECOMMENDED: 50", inline="rsi_long")
c_adx_min_str = input(25, title="ADX Min Strength", group="ADX Settings")

c_enter_short_bbr = input(1, title="Highest BB %B", group="Enter SHORT Conditions", tooltip="The Highest required BB %B required to enter a SHORT position. RECOMMENDED: 1")
c_enter_short_rsi_min = input(50, title="MIN RSI", group="Enter SHORT Conditions", tooltip="The Minimum RSI value to enter a SHORT position. RECOMMENDED: 50", inline="rsi_short")
c_enter_short_rsi_max = input(70, title="MAX RSI", group="Enter SHORT Conditions", tooltip="The Maximum RSI value to enter a SHORT position. RECOMMENDED: 70", inline="rsi_short")

// Enter Long Conditions
enter_long = (low < lower) and (bbr > c_enter_long_bbr) and (rsi > c_enter_long_rsi_min) and (rsi < c_enter_long_rsi_max) and (adxStr > c_adx_min_str)  ? 1 : 0
// Enter Short Conditions
enter_short = (high > upper) and (bbr < c_enter_short_bbr) and (rsi > c_enter_short_rsi_min) and (rsi < c_enter_short_rsi_max) and (adxStr > c_adx_min_str)  ? -1 : 0


//plotarrow(enter_long, maxheight=10)    

//plotarrow(enter_short, maxheight=10)    




if enter_long
    strategy.entry("Enter Long", strategy.long)
else if enter_short
    strategy.entry("Enter Short", strategy.short)

संबंधित

अधिक