
इंद्रधनुष वाइब्रेटर रीमेक रणनीति एक मात्रात्मक ट्रेडिंग रणनीति है जो इंद्रधनुष वाइब्रेटर संकेतक पर आधारित है। यह रणनीति बाजार की प्रवृत्ति की दिशा और ताकत का आकलन करने के लिए स्टॉक मूल्य और औसत के बीच विचलन की गणना करके लंबी और छोटी स्थिति की दिशा का निर्णय करती है।
इस रणनीति का मुख्य संकेतक Rainbow Oscillator (RO) है, जिसका सूत्र इस प्रकार हैः
RO = 100 * ((收盘价 - 10日移动平均线) / (最高价的最高值 - 最低价的最低值))
इसमें 10 दिन की चलती औसत 10 चक्रों के समापन मूल्य का एक सरल चलती औसत है। यह सूचक कीमतों के अपने औसत से विचलन को दर्शाता है। जब आरओ > 0 है, तो कीमतें औसत से ऊपर हैं, एक नकारात्मक संकेत है; जब आरओ < 0 है, तो कीमतें औसत से नीचे हैं, एक नकारात्मक संकेत है।
इस रणनीति में एक सहायक सूचक, बैंडविड्थ (RB) की गणना भी की गई है, जिसका सूत्र इस प्रकार हैः
RB = 100 * ((均线的最高值 - 均线的最低值) / (最高价的最高值 - 最低价的最低值))
आरबी औसत रेखाओं के बीच की चौड़ाई को दर्शाता है। आरबी जितना बड़ा है, कीमतों में उतार-चढ़ाव उतना ही अधिक होता है, और इसके विपरीत, कीमतें स्थिर होती हैं। आरबी संकेतक का उपयोग बाजार की स्थिरता का आकलन करने के लिए किया जा सकता है।
यह रणनीति आरओ और आरबी संकेतकों के आधार पर मूल्य विचलन और बाजार की स्थिरता का आकलन करती है, जिससे लंबी और छोटी स्थिति के लिए ट्रेडिंग सिग्नल उत्पन्न होते हैं।
इस रणनीति के निम्नलिखित फायदे हैं:
इस रणनीति के कुछ जोखिम भी हैं:
क्या करें?
इस रणनीति को निम्नलिखित पहलुओं से भी अनुकूलित किया जा सकता हैः
इंद्रधनुष कंपन रिटारगेटिंग रणनीति मूल्य और औसत रेखा के बीच विचलन की गणना करके बाजार की प्रवृत्ति और स्थिरता का आकलन करती है, ताकि लंबी और छोटी स्थिति में व्यापार किया जा सके। यह रणनीति सहज है, इसे आसानी से पढ़ा जा सकता है, इसे लागू करना आसान है, और इसका कुछ व्यावहारिक मूल्य है। लेकिन कुछ जोखिम भी हैं, जिन्हें पैरामीटर और ट्रेडिंग नियमों के लिए अनुकूलित करने की आवश्यकता है, जोखिम को कम करने और प्रदर्शन को बढ़ाने के लिए।
/*backtest
start: 2023-11-25 00:00:00
end: 2023-12-25 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=2
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 18/03/2018
// Ever since the people concluded that stock market price movements are not
// random or chaotic, but follow specific trends that can be forecasted, they
// tried to develop different tools or procedures that could help them identify
// those trends. And one of those financial indicators is the Rainbow Oscillator
// Indicator. The Rainbow Oscillator Indicator is relatively new, originally
// introduced in 1997, and it is used to forecast the changes of trend direction.
//
// As market prices go up and down, the oscillator appears as a direction of the
// trend, but also as the safety of the market and the depth of that trend. As
// the rainbow grows in width, the current trend gives signs of continuity, and
// if the value of the oscillator goes beyond 80, the market becomes more and more
// unstable, being prone to a sudden reversal. When prices move towards the rainbow
// and the oscillator becomes more and more flat, the market tends to remain more
// stable and the bandwidth decreases. Still, if the oscillator value goes below 20,
// the market is again, prone to sudden reversals. The safest bandwidth value where
// the market is stable is between 20 and 80, in the Rainbow Oscillator indicator value.
// The depth a certain price has on a chart and into the rainbow can be used to judge
// the strength of the move.
//
// You can change long to short in the Input Settings
// WARNING:
// - For purpose educate only
// - This script to change bars colors.
////////////////////////////////////////////////////////////
strategy(title="Rainbow Oscillator Backtest")
Length = input(2, minval=1)
LengthHHLL = input(10, minval=2, title="HHV/LLV Lookback")
reverse = input(false, title="Trade reverse")
xMA1 = sma(close, Length)
xMA2 = sma(xMA1, Length)
xMA3 = sma(xMA2, Length)
xMA4 = sma(xMA3, Length)
xMA5 = sma(xMA4, Length)
xMA6 = sma(xMA5, Length)
xMA7 = sma(xMA6, Length)
xMA8 = sma(xMA7, Length)
xMA9 = sma(xMA8, Length)
xMA10 = sma(xMA9, Length)
xHH = highest(close, LengthHHLL)
xLL = lowest(close, LengthHHLL)
xHHMAs = max(xMA1,max(xMA2,max(xMA3,max(xMA4,max(xMA5,max(xMA6,max(xMA7,max(xMA8,max(xMA9,xMA10)))))))))
xLLMAs = min(xMA1,min(xMA2,min(xMA3,min(xMA4,min(xMA5,min(xMA6,min(xMA7,min(xMA8,min(xMA9,xMA10)))))))))
xRBO = 100 * ((close - ((xMA1+xMA2+xMA3+xMA4+xMA5+xMA6+xMA7+xMA8+xMA9+xMA10) / 10)) / (xHH - xLL))
xRB = 100 * ((xHHMAs - xLLMAs) / (xHH - xLL))
clr = iff(xRBO >= 0, green, red)
pos = iff(xRBO > 0, 1,
iff(xRBO < 0, -1, nz(pos[1], 0)))
possig = iff(reverse and pos == 1, -1,
iff(reverse and pos == -1, 1, pos))
if (possig == 1)
strategy.entry("Long", strategy.long)
if (possig == -1)
strategy.entry("Short", strategy.short)
barcolor(possig == -1 ? red: possig == 1 ? green : blue )
plot(xRBO, color=clr, title="RO", style= histogram, linewidth=2)
p0 = plot(0, color = gray, title="0")
p1 = plot(xRB, color=green, title="RB")
p2 = plot(-xRB, color=red, title="RB")
fill(p1, p0, color=green)
fill(p2, p0, color=red)