
इस रणनीति का उद्देश्य सिक्कों को खरीदने और रखने के लिए एक स्केलर ट्रेडिंग रणनीति है, जो कि यादृच्छिक सूचकांक चिकनी चलती औसत (आरएसआई) और सूचकांक चलती औसत (ईएमए) पर आधारित है। यह 5 मिनट के लाइन पर लागू होता है और बीटीसी के लिए अनुकूलित किया गया है। रणनीति का लक्ष्य है कि जितना संभव हो उतना सिक्का रखें जब यह पार हो जाए या बहुत कम हो जाए।
यह रणनीति आरएसआई सूचक का उपयोग करती है ताकि यह पता लगाया जा सके कि क्या यह ओवरबॉट ओवरसोल्ड क्षेत्र में है और इसे खरीदने और बेचने के संकेतों के लिए यादृच्छिक आरएसआई सूचक के के- और डी-वैल्यू संबंधों के साथ जोड़ा गया है।
जब यादृच्छिक आरएसआई के के लाइन 20 से नीचे होता है, तो इसे ओवरसोल्ड माना जाता है, और जब के लाइन डी लाइन से अधिक होती है, तो एक खरीद संकेत उत्पन्न होता है। इसके बाद, यह तीन शर्तों के आधार पर तय किया जाता है कि क्या बेचा गया हैः 1) ईएमए पलटाव 1 प्रतिशत से अधिक की कीमत में वृद्धि के बाद होता है; 2) जब यादृच्छिक आरएसआई के के लाइन डी लाइन से नीचे होती है; 3) जब स्टॉप-लॉस मूल्य प्रवेश मूल्य का 98.5% तक पहुंचता है।
इसके अलावा, जब अल्पकालिक ईएमए में गिरावट होती है, तो इसे बेचने के संकेत के रूप में माना जाता है।
रणनीति यादृच्छिक आरएसआई और ईएमए जैसे कई संकेतकों के लाभ को एकीकृत करती है, और खरीदने और बेचने के समय का आकलन करने के लिए एक अधिक मजबूत दृष्टिकोण का उपयोग करती है। पैरामीटर अनुकूलन और जोखिम प्रबंधन के माध्यम से रणनीति की रिटर्न दर और स्थिरता को और बढ़ाया जा सकता है। कुल मिलाकर, रणनीति तर्कसंगत है और यह परीक्षण और अनुकूलन के लायक है।
/*backtest
start: 2023-09-30 00:00:00
end: 2023-10-30 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy(title="Stochastic RSI W Auto Buy Scalper Scirpt III ", shorttitle="Stoch RSI_III", format=format.price, precision=2)
smoothK = input.int(3, "K", minval=1)
smoothD = input.int(3, "D", minval=1)
lengthRSI = input.int(14, "RSI Length", minval=1)
lengthStoch = input.int(14, "Stochastic Length", minval=1)
src = input(close, title="RSI Source")
rsi1 = ta.rsi(src, lengthRSI)
k = ta.sma(ta.stoch(rsi1, rsi1, rsi1, lengthStoch), smoothK)
d = ta.sma(k, smoothD)
plot(k, "K", color=#2962FF)
plot(d, "D", color=#FF6D00)
h0 = hline(80, "Upper Band", color=#787B86)
hline(50, "Middle Band", color=color.new(#787B86, 50))
h1 = hline(20, "Lower Band", color=#787B86)
longStopLoss = strategy.opentrades.entry_price(0)* (.985)
stochDropping = ta.falling(k,2)
shortSma = ta.sma(hlc3,12)
shorterSma = ta.sma(hlc3,3)
plot(shortSma[3])
shortSmaFlip = (ta.change(shortSma,3)>0) and ta.falling(hlc3,1)
shorterSmaFlip = (ta.change(shorterSma,2)>0) and ta.falling(hlc3,1)
messageSellText ='"type": "sell", "symbol": "BTCUSD", "marketPosition": "{{strategy.market_position}}"'
messageBuyText ='"type": "buy", "symbol": "BTCUSD", "marketPosition": {{strategy.market_position}}"'
fill(h0, h1, color=color.rgb(33, 150, 243, 90), title="Background")
strategy.entry("Tech", strategy.long, when=(strategy.position_size <= 0 and k<17 and k>d),alert_message=messageBuyText)
//original: strategy.close("TL", when=(strategy.position_size >= 0 and (k>90 and k<d)))
takeProfit = hlc3 > strategy.opentrades.entry_price(0)*1.01
//longStopLoss = strategy.opentrades.entry_price(0)* (.995)
strategy.close("Tech", when=(strategy.position_size >= 0 and (k>90 and k<d and stochDropping)) or close<longStopLoss, comment="rsi or Stop sell",alert_message=messageSellText)
//strategy.close("Tech", when=(strategy.position_size >= 0 and close<longStopLoss), comment="stopLoss sell",alert_message=messageSellText)
strategy.close("Tech", when=(shortSmaFlip and k>20 and takeProfit),comment="Sma after profit",alert_message=messageSellText)