यह रणनीति अल्फाट्रेंड सूचक पर आधारित है, जो आरएसआई और एमएफआई दोनों सूचकांकों के फायदे को जोड़ती है, जो एक बहुभाषी ट्रेंडिंग बाजार में बेहतर रणनीतिक प्रभाव प्राप्त करती है। यह रणनीति मुख्य रूप से यह निर्धारित करती है कि क्या कीमतें अल्फाट्रेंड वक्र को तोड़ती हैं, ताकि प्रवृत्ति की दिशा को पकड़ सकें।
यह रणनीति मुख्य रूप से अल्फाट्रेंड वक्र पर निर्भर करती है ताकि कीमतों की प्रवृत्ति की दिशा निर्धारित की जा सके। यह एटीआर बाजार में उतार-चढ़ाव के माप, आरएसआई और एमएफआई बहुमुखी सूचकांक को एकीकृत करता है, जिससे कीमतों की प्रवृत्ति को प्रभावी ढंग से ट्रैक किया जा सके। जब कीमतें वक्र को तोड़ती हैं, तो यह संकेत देती है कि प्रवृत्ति बदल जाती है, यह समय प्रवेश बिंदु है।
कुल मिलाकर, यह रणनीति बाजार के शोर को प्रभावी ढंग से फ़िल्टर करने, प्रवृत्ति की पहचान करने और एक सटीक और कुशल प्रवृत्ति का पालन करने की रणनीति के रूप में लागू होती है।
जोखिम के लिए, एक एकल नुकसान को नियंत्रित करने के लिए स्टॉप-लॉस सेट किया जा सकता है; पैरामीटर के अनुकूलित संयोजन, अन्य सूचक संयोजनों के साथ उपयोग किया जाता है ताकि शून्य संकेतों को कम किया जा सके; विभिन्न बाजारों के अनुसार पैरामीटर सेटिंग्स को समायोजित करें।
विभिन्न बाजारों और मापदंडों के परीक्षण के माध्यम से, रणनीति को अनुकूलित करना जारी रखा जा सकता है ताकि यह अधिक प्रकार की स्थितियों के अनुकूल हो सके।
अल्फाट्रेंड रणनीति समग्र रूप से एक सरल और कुशल प्रवृत्ति का पालन करने की रणनीति है। यह कीमत और व्यापार की मात्रा को जोड़ती है, जो कि अधिक बाजार की स्थिति के लिए अनुकूल है। यह स्पष्ट रूप से प्रवेश के समय को तोड़ने के लिए है। जोखिम को नियंत्रित करने की स्थिति में, रणनीति का अच्छा प्रभाव प्राप्त किया जा सकता है। यह आगे के परीक्षण और अनुकूलन के लायक है, जिससे यह अधिक बाजारों में स्थिर लाभप्रदता प्राप्त कर सके।
/*backtest
start: 2023-09-20 00:00:00
end: 2023-09-26 00:00:00
period: 30m
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// author © KivancOzbilgic
// developer © KivancOzbilgic
// pv additions, simplification and strategy conversion @ treigen
//@version=5
strategy('AlphaTrend For ProfitView', overlay=true, calc_on_every_tick=true, process_orders_on_close=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.1, initial_capital=1000)
coeff = input.float(1.5, 'Multiplier', step=0.1)
AP = input(15, 'Common Period')
ATR = ta.sma(ta.tr, AP)
novolumedata = input(title='Change calculation (no volume data)?', defval=false)
i_startTime = input(defval = timestamp("01 Jan 2014 00:00 +0000"), title = "Backtesting Start Time", inline="timestart", group='Backtesting')
i_endTime = input(defval = timestamp("01 Jan 2100 23:59 +0000"), title = "Backtesting End Time", inline="timeend", group='Backtesting')
timeCond = true
pv_ex = input.string('', title='Exchange', tooltip='Leave empty to use the chart ticker instead (Warning: May differ from actual market name in some instances)', group='PV Settings')
pv_sym = input.string('', title='Symbol', tooltip='Leave empty to use the chart ticker instead (Warning: May differ from actual market name in some instances)', group='PV Settings')
pv_acc = input.string("", title="Account", group='PV Settings')
pv_alert_long = input.string("", title="PV Alert Name Longs", group='PV Settings')
pv_alert_short = input.string("", title="PV Alert Name Shorts", group='PV Settings')
pv_alert_test = input.bool(false, title="Test Alerts", tooltip="Will immediately execute the alerts, so you may see what it sends. The first line on these test alerts will be excluded from any real alert triggers" ,group='PV Settings')
upT = low - ATR * coeff
downT = high + ATR * coeff
AlphaTrend = 0.0
AlphaTrend := (novolumedata ? ta.rsi(close, AP) >= 50 : ta.mfi(hlc3, AP) >= 50) ? upT < nz(AlphaTrend[1]) ? nz(AlphaTrend[1]) : upT : downT > nz(AlphaTrend[1]) ? nz(AlphaTrend[1]) : downT
k1 = plot(AlphaTrend, color=color.new(#0022FC, 0), linewidth=3)
k2 = plot(AlphaTrend[2], color=color.new(#FC0400, 0), linewidth=3)
buySignalk = ta.crossover(AlphaTrend, AlphaTrend[2])
sellSignalk = ta.crossunder(AlphaTrend, AlphaTrend[2])
var exsym = ""
if barstate.isfirst
exsym := pv_ex == "" ? "" : "ex=" + pv_ex + ","
exsym := pv_sym == "" ? exsym : exsym + "sym=" + pv_sym + ","
if barstate.isconfirmed and timeCond
if strategy.position_size <= 0 and buySignalk
strategy.entry("Buy", strategy.long)
alert(pv_alert_long + "(" + exsym + "acc=" + pv_acc + ")", alert.freq_once_per_bar_close)
if strategy.position_size >= 0 and sellSignalk
strategy.entry("Sell", strategy.short)
alert(pv_alert_short + "(" + exsym + "acc=" + pv_acc + ")", alert.freq_once_per_bar_close)
// Only used for testing/debugging alert messages
if pv_alert_test
alert("<![Alert Test]!>\n" + pv_alert_long + "(" + exsym + "acc=" + pv_acc + ")", alert.freq_once_per_bar)
alert("<![Alert Test]!>\n" + pv_alert_short + "(" + exsym + "acc=" + pv_acc + ")", alert.freq_once_per_bar)