यह रणनीति बाजार के रुझान की दिशा का आकलन करने के लिए Fractal Chaos Oscillator (FCO) के संकेतकों की गणना करके ट्रेंड ट्रैकिंग को लागू करती है। एफसीओ मूल्य आंदोलन को स्थानीय चरम और न्यूनतम मूल्य में परिवर्तन की तुलना करके निर्धारित करता है, संख्यात्मक सीमा -1 से 1 के बीच होती है, संख्यात्मक मूल्य जितना अधिक होता है, उतना ही स्पष्ट होता है। जब एफसीओ उच्च होता है, तो अधिक होता है, और जब कम होता है तो शून्य होता है।
FCO सूचकांक की गणना करें। उदाहरण के लिए, जब नवीनतम सेट का अधिकतम न्यूनतम मूल्य पिछले सेट के साथ मेल नहीं खाता है, तो FCO 1 है, यह दर्शाता है कि कीमतों में वृद्धि की प्रवृत्ति मजबूत हो गई है। एफसीओ मूल्य के आधार पर प्रवृत्ति की दिशा का न्याय करें, संख्या जितनी अधिक होगी, उतनी अधिक होगी, और संख्या जितनी कम होगी, उतनी कम होगी।
प्रवृत्ति को बदलने के लिए, पैरामीटर को अनुकूलित किया जा सकता है या अन्य संकेतकों के साथ जोड़ा जा सकता है।
एफसीओ रणनीति सरल संकेतकों के माध्यम से प्रवृत्ति की दिशा का आकलन करती है, जो शॉर्ट-लाइन ट्रेडिंग के लिए उपयुक्त है। पैरामीटर अनुकूलन और अन्य तरीकों से प्रभावशीलता को बढ़ाया जा सकता है। यह एक आसान-से-कार्यान्वित प्रवृत्ति ट्रैकिंग रणनीति विचार है।
/*backtest
start: 2023-09-10 00:00:00
end: 2023-09-17 00:00:00
period: 1m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=2
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 22/02/2018
// The value of Fractal Chaos Oscillator is calculated as the difference between
// the most subtle movements of the market. In general, its value moves between
// -1.000 and 1.000. The higher the value of the Fractal Chaos Oscillator, the
// more one can say that it follows a certain trend – an increase in prices trend,
// or a decrease in prices trend.
//
// Being an indicator expressed in a numeric value, traders say that this is an
// indicator that puts a value on the trendiness of the markets. When the FCO reaches
// a high value, they initiate the “buy” operation, contrarily when the FCO reaches a
// low value, they signal the “sell” action. This is an excellent indicator to use in
// intra-day trading.
//
// You can change long to short in the Input Settings
// WARNING:
// - For purpose educate only
// - This script to change bars colors.
////////////////////////////////////////////////////////////
fractalUp(pattern) =>
p = high[pattern+1]
okl = 1
okr = 1
for i = pattern to 1
okl := iff(high[i] < high[i+1] and okl == 1 , 1, 0)
for i = pattern+2 to pattern*2+1
okr := iff(high[i] < high[i-1] and okr == 1, 1, 0)
res = iff(okl == 1 and okr == 1, p, res[1])
res
fractalDn(pattern) =>
p = low[pattern+1]
okl = 1
okr = 1
for i = pattern to 1
okl := iff(low[i] > low[i+1] and okl == 1 , 1, 0)
for i = pattern+2 to pattern*2+1
okr := iff(low[i] > low[i-1] and okr == 1, 1, 0)
res = iff(okl == 1 and okr == 1, p, res[1])
res
strategy(title="Fractal Chaos Oscillator", overlay = false)
Pattern = input(1, minval=1)
reverse = input(false, title="Trade reverse")
xUpper = fractalUp(Pattern)
xLower = fractalDn(Pattern)
xRes = iff(xUpper != xUpper[1], 1,
iff(xLower != xLower[1], -1, 0))
pos = iff(xRes == 1, 1,
iff(xRes == -1, -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(xRes, color=blue, title="FCO")