यह रणनीति द्वि-MACD सूचक और यादृच्छिक सूचक स्टोचआरएसआई के साथ व्यापार संकेत निर्णय करती है। द्वि-MACD विभिन्न पैरामीटर सेटिंग्स को लागू करता है ताकि तेजी से और धीमी गति से प्रभाव हो सके, स्टोचआरएसआई को मजबूत बैकपैक सत्यापन के लिए उपयोग किया जाता है। रणनीति में ट्रेंड निर्णय और स्टॉप लॉस कंट्रोल जोखिम भी शामिल हैं।
इस रणनीति के लिए ट्रेडिंग सिग्नल का आकलन निम्नलिखित संकेतकों पर आधारित हैः
दोहरी MACD: फास्ट MACD में लघु-चक्र पैरामीटर और धीमी MACD में दीर्घ-चक्र पैरामीटर होते हैं, जो अलग-अलग चिकनाई प्रभाव प्रदान करते हैं।
स्टोच आरएसआईः आरएसआई की उच्चतम और निम्नतम अवधि की गणना करें, यह निर्धारित करने के लिए कि क्या आरएसआई ओवरबॉट और ओवरसोल्ड स्थिति में है।
ट्रेडिंग सिग्नल के लिए नियमः
अधिक करेंः तेजी से MACD पर शून्य-अक्ष और धीमी गति से MACD पर शून्य-अक्ष, स्टोच आरएसआई ओवरसोल्ड है और के लाइन पर डी लाइन के माध्यम से, और एक ऊपर की ओर प्रवृत्ति में है।
खाली करनाः तेजी से MACD शून्य अक्ष के नीचे और धीमी गति से MACD शून्य अक्ष के नीचे, StochRSI ओवरबॉट में है और K लाइन के नीचे D लाइन के माध्यम से है, और एक गिरावट की प्रवृत्ति में है।
दोहरे MACD सत्यापन से झूठी दरारों को रोका जा सकता है और सिग्नल की गुणवत्ता में सुधार हो सकता है।
StochRSI ने ओवरबॉय और ओवरसोल की स्थिति का आकलन किया, और गिरावट को रोकने से बचने के लिए।
इस प्रकार, व्यापारियों के लिए यह एक अच्छा विकल्प है कि वे अपने व्यापार के नुकसान को कम करने के लिए बड़े रुझानों पर विचार करें।
सिग्नल की प्रभावशीलता को बढ़ाने के लिए बहु-समय सीमा सत्यापन को लागू करना।
स्टॉप लॉस कंट्रोल रिस्क सेट करें
मैकड के लिए, यह गलत संकेतों के लिए अतिसंवेदनशील है, और इसे और अधिक फ़िल्टरिंग की आवश्यकता है।
StochRSI पैरामीटर को गलत तरीके से सेट करने से ट्रेडिंग के अवसरों को याद किया जा सकता है।
स्टॉपरपॉइंट सेटिंग्स अनुचित रूप से रूढ़िवादी या कट्टरपंथी हो सकती हैं।
यह भी कहा गया है, “उन्होंने अपने शेयरों के लिए कोई रणनीति नहीं बनाई है और उन्हें रोकना मुश्किल है।
यह निम्नलिखित तरीकों से अनुकूलित किया जा सकता हैः
फ़िल्टर शर्तें जैसे कि लेनदेन की मात्रा या औसत कोण बढ़ाना।
StochRSI पैरामीटर को अनुकूलित करें या अन्य यादृच्छिक संकेतकों को शामिल करें।
गतिशील रूप से स्टॉपलॉस समायोजित करें, स्टॉपलॉस ट्रैक करें।
स्थिति प्रबंधन मॉड्यूल जोड़े गए, जो रणनीति के प्रदर्शन के आधार पर स्थिति को गतिशील रूप से समायोजित करता है।
इस रणनीति के मुख्य अनुकूलन दिशाएं हैंः
सूचकांक पैरामीटर को अनुकूलित करें और सूचकांक प्रभाव को बढ़ाएं।
फ़िल्टर करने के लिए फ़िल्टरिंग शर्तें जोड़ें
स्टॉप लॉस रणनीति को अनुकूलित करें और गतिशील स्टॉप लॉस प्राप्त करें।
पोजीशन मैनेजमेंट को लागू करना, रणनीति प्रभाव के अनुसार पोजीशन को समायोजित करना।
मशीन लर्निंग मॉड्यूल को जोड़ना और बिग डेटा का उपयोग करके स्वचालित अनुकूलन करना।
इस रणनीति में कई संकेतकों को समेकित किया गया है, जिससे मजबूत व्यापारिक संकेतों का निर्माण होता है। हालांकि, अनावश्यक व्यापार को कम करने और लाभ की संभावना को बढ़ाने के लिए पैरामीटर सेटिंग, सिग्नल और गतिशील स्टॉपलॉस को और अधिक फ़िल्टर करने की आवश्यकता है। समग्र रूप से, रणनीति विचार तर्कसंगत है, अनुकूलन के लिए अच्छा स्थान है।
/*backtest
start: 2023-09-14 00:00:00
end: 2023-09-21 00:00:00
period: 1m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=2
//This strategy is an ongoing work in progress. Last updated 8/6/16.
//Feel free to modify it as you see fit, if you do borrow code then send me a link so I
//can see and maybe borrow some of your code to improve this.
//Thanks to ChrisMoody who I stole the code for setting custom resolution from.
//
//more info in comments at end of script
strategy("MACDouble & StochRSI w/ safeties v0.3", overlay=true)
source = close
useCurrentRes = input(true, title="Uncheck to use custom res./intrv. for 2nd MACD indicator")
resCustom = input(title="Resolution/interval to use for 2nd MACD:", defval="45")
res = useCurrentRes ? timeframe.period : resCustom
useCurrentRes2 = input(true, title="Uncheck to use custom res/intrv for StochRSI")
resCustom2 = input(title="Resolution to use for StochRSI indicator:", defval="45")
res2 = useCurrentRes2 ? timeframe.period : resCustom2
//MACD1
fastLength = input(10, title="MACD fast length")
slowlength = input(21, title="MACD slow length")
sigLength = input(9, title="MACD signal length")
MACD = ema(source, fastLength) - ema(source, slowlength)
signal = sma(MACD, sigLength)
delta = MACD - signal
//MACD2
fastLength2 = input(31, title= "2nd MACD fast length")
slowlength2 = input(63, title= "2nd MACD slow length")
sigLength2 = input(30, title= "2nd MACD signal length")
MACD2 = ema(source, fastLength2) - ema(source, slowlength2)
signal2 = sma(MACD2, sigLength2)
delta2 = MACD2 - signal2
MACDRes = security(syminfo.tickerid, res, MACD2)
signalRes = security(syminfo.tickerid,res, signal2)
deltaRes = security(syminfo.tickerid, res, delta2)
uptrend = (close + high)/(close[1] + high[2])
downtrend = (close + low)/(close[1] + low[2])
smoothK = input(3, minval=1)
smoothD = input(3, minval=1)
lengthRSI = input(11, minval=1)
lengthStoch = input(11, minval=1)
src = close
rsi1 = rsi(src, lengthRSI)
k = sma(stoch(rsi1, rsi1, rsi1, lengthStoch), smoothK)
d = sma(k, smoothD)
RSI_buyTrig = input(90)
RSI_sellTrig = input(20)
kRes = security(syminfo.tickerid, res2, k)
dRes = security(syminfo.tickerid, res2, d)
if (delta > 0) and (year>2012) and (deltaRes > 0) and (uptrend > 1) and ( kRes and dRes < RSI_buyTrig) and (kRes > dRes)
strategy.entry("buy", strategy.long, comment="buy")
if (delta < 0) and (year>2012) and (deltaRes < 0) and (downtrend < 1) and ( kRes and dRes > RSI_sellTrig) and (kRes < dRes)
strategy.entry("sell", strategy.short, comment="sell")
strategy.exit("sell", loss = 9000)
// RELEASE NOTES, ETC
//
// The core starting idea for this backtesting script came from the desire to have two traditional
//MACD indicators: one 'fast' and one 'slow'. The slow one is to pretty much smooth out noisy signals
//so that short term changes in price are ignored (ideally).
// A brief version history
// v0.1 - Basic two MACD indicators script
// v0.2 - Added StochRSI indicator
// v0.21- Added primitive uptrend/downtrend safety condition
// v0.22- Added changable time resolution for MACDslow
// v0.23- Added exit safeties conditional on loss threshold
// v0.3 - Added changeable resolution for StochRSI
// Future changes planned for next release:
// -Fine tuning exit safeties
// -Major overhaul of trade logic/triggers (may be forked as a different script)
//
//I am more than happy to discuss any difficulties you are having, questions about the script, or improvement suggestions.
//I am not a coder and my background is actually in economics, so feel free to debug ;)
//Feel free to tip me on the indcluded bitcoin address on TV as well
// tradingview.com/u/RyanMartin
// [email protected]