यह रणनीति ब्रिन बैंड के टूटने के सिद्धांत पर आधारित है, जब कीमत पूरी तरह से ट्रैक या ट्रैक को तोड़ देती है तो रिवर्स ऑपरेशन किया जाता है। यह असामान्य उतार-चढ़ाव के बाद वापसी इक्विटी आंदोलन को पकड़ने में सक्षम है, जो सक्रिय व्यापारियों के लिए प्रभावी लाभप्रदता की तलाश में है।
यह रणनीति ब्रींड बैंड का उपयोग करती है, जो वर्तमान बाजार की अस्थिरता को परिभाषित करती है। जब कीमतें पूर्ण सूर्य या चंद्रमा के स्तंभों का निर्माण करती हैं और पूरी तरह से ब्रींड बैंड को पार करती हैं, तो यह दर्शाता है कि बाजार में उच्च अस्थिरता है, और कीमतें समानांतर दिशा में वापस आ जाएंगी।
विशेष रूप से, रणनीति 20 K लाइनों के समापन मूल्य के साथ बुरिन बैंड के मध्य रेल, ऊपरी रेल और निचले रेल की गणना करती है। जब कीमत निचले रेल से कम होती है और समापन मूल्य खोलने की कीमत से कम होता है, तो एक अधिक संकेत उत्पन्न होता है। जब कीमत ऊपरी रेल से अधिक होती है और समापन मूल्य खोलने की कीमत से अधिक होती है, तो एक शून्य संकेत उत्पन्न होता है। इसके बाद ब्रेकआउट को स्टॉपलॉस के रूप में उपयोग किया जाता है, मध्य रेल को पहले लक्ष्य मूल्य समतल के रूप में।
इस रणनीति के मुख्य लाभ निम्नलिखित हैं:
ब्रिन बैंड का उपयोग बाजार में उतार-चढ़ाव की डिग्री का आकलन करने के लिए किया जाता है ताकि असामान्य स्थितियों की पहचान की जा सके।
ब्रेकआउट बिंदु एक स्टॉपलॉस बिंदु है जो जोखिम को प्रभावी ढंग से नियंत्रित करता है।
मध्य-रेल पर लौटने के लिए उचित लक्ष्य सेट करें, ताकि ओवर-फॉलो-अप से बचा जा सके।
पूर्ण के-लाइन फ़िल्टरिंग झूठी दरार, सिग्नल की गुणवत्ता में सुधार।
सरल पैरामीटर सेट, लागू करने और अनुकूलित करने में आसान।
यह स्पष्ट और समझने योग्य तर्क है, और कोड सरल और सुरुचिपूर्ण है।
इस रणनीति के साथ निम्नलिखित जोखिम भी हैं:
गलत ब्रिन बैंड पैरामीटर के कारण विफलता हो सकती है।
यह एक नए रुझान की शुरुआत हो सकती है, जो जल्दबाजी में बाहर निकलने का खतरा है।
मध्य-कक्षा लक्ष्य शायद बहुत अधिक रूढ़िवादी है और लगातार लाभदायक नहीं है।
इस प्रकार, एक बड़े क्षेत्र को पूरी तरह से भरा नहीं जा सकता है, और स्लाइडिंग बिंदुओं का खतरा है।
इस तरह के अस्थिर रुझानों के कारण अक्सर अनावश्यक लेन-देन हो सकता है।
इस रणनीति में निम्नलिखित सुधारों पर विचार किया जा सकता हैः
प्रवृत्ति की ताकत का आकलन करें, पैरामीटर को समायोजित करें या ट्रेडिंग की आवृत्ति।
अन्य मापदंडों के साथ मिलकर, सबसे अच्छा प्रवेश बिंदु निर्धारित करें।
स्टॉप लॉस को उतार-चढ़ाव के आधार पर समायोजित करें
यह एक अच्छा विकल्प है, लेकिन यह भी एक अच्छा विकल्प नहीं है।
फिर से प्रवेश की व्यवस्था में शामिल हों और लाभ को अनुकूलित करें।
यह भी पढ़ेंः ‘असली ट्रस्ट को तोड़ने से बचें’
यह रणनीति बुरीन बैंड ब्रेकथ्रू सिद्धांत पर आधारित है, जो अल्पकालिक मुनाफे की खोज करने वाले सक्रिय व्यापारियों के लिए उपयुक्त है। इसका लाभ जोखिम नियंत्रण स्पष्ट है, नुकसान यह है कि जल्दी से बाहर निकलने और लाभ की जगह सीमित है। पैरामीटर अनुकूलन, सहायक संकेतक आदि के माध्यम से प्रभावशीलता को बढ़ाया जा सकता है।
/*backtest
start: 2023-09-06 00:00:00
end: 2023-10-06 00:00:00
period: 3h
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/
// © Bishnu103
//@version=4
strategy(title="Full Candle Outside BB [v1.0][Bishnu103]",shorttitle="OUTSIDE BB",overlay=true,calc_on_every_tick=true,backtest_fill_limits_assumption=2)
// ***********************************************************************************************************************
// input variables
buy_session = input(title="Buy Session", type=input.session, defval="0915-1430")
exit_inraday = input(title="Exit Intraday?", type=input.bool, defval=true)
entry_distance = input(title="Entry distance from alert", minval=1, maxval=10, defval=3)
show_bb_switch = input(title="Show BB", type=input.bool, defval=true)
//
bbLength = input(title="BB Length", minval=1, defval=20)
bbStdDev = input(title="BB StdDev", minval=1, defval=2)
// ***********************************************************************************************************************
// global variables
long_entry = false
short_entry = false
long_exit = false
short_exit = false
// variable values available across candles
var entry_price = 0.0
var sl_price = 0.0
var exit_price = 0.0
var candle_count = 0
// ***********************************************************************************************************************
// function to return bollinger band values based on candle poition passed
getBB(pos) => [mBB, uBB, lBB] = bb(close[pos], bbLength, bbStdDev)
// function returns true if current time is within intraday byuing session set in input
BarInSession(sess) => time(timeframe.period, sess) != 0
// ***********************************************************************************************************************
// strategy
//
// get current bb value
[mBB_0,uBB_0,lBB_0] = getBB(0)
// check if full candle outside upper BB
outside_uBB = low > uBB_0 and close <= open
outside_lBB = high < lBB_0 and close >= open
// ***********************************************************************************************************************
// entry conditions
long_entry := outside_lBB
short_entry := outside_uBB
// keep candle count since the alert generated so that order can be cancelled after N number of candle calling it out as invalid alert
candle_count := candle_count + 1
if long_entry or short_entry
candle_count := 0
// ***********************************************************************************************************************
// risk management
//
// decide entry and sl price
if long_entry
entry_price := high
if short_entry
entry_price := low
if long_entry
sl_price := low
if short_entry
sl_price := high
// first exit is when price hits middle BB, gets updated for each candle based on it's middle BB value
exit_price := mBB_0
// ***********************************************************************************************************************
// position sizing
price = if close[0] > 25000
25000
else
price = close[0]
qty = 25000/price
// ***********************************************************************************************************************
// entry
//if long_entry and strategy.position_size == 0
// strategy.entry("BUY", strategy.long, qty, stop=entry_price, comment="BUY @ "+ tostring(entry_price))
if long_entry and strategy.position_size == 0
strategy.order("BUY", strategy.long, qty, stop=entry_price, comment="BUY @ "+ tostring(entry_price))
//if short_entry and strategy.position_size == 0
// strategy.entry("SELL", strategy.short, qty, stop=entry_price, comment="SELL @ "+ tostring(entry_price))
if short_entry and strategy.position_size == 0
strategy.order("SELL", strategy.short, qty, stop=entry_price, comment="SELL @ "+ tostring(entry_price))
// cancel an order if N number of candles are completed after alert candle
strategy.cancel_all(candle_count > entry_distance)
// if current time is outside byuing session then do not enter intraday trade
strategy.cancel_all(timeframe.isintraday and not BarInSession(buy_session))
// ***********************************************************************************************************************
// exit
if strategy.position_size > 0
strategy.cancel("EXIT at MBB", true)
strategy.cancel("EXIT at SL", true)
strategy.order("EXIT at MBB", strategy.short, abs(strategy.position_size), limit=exit_price, comment="EXIT TG @ "+ tostring(exit_price))
strategy.order("EXIT at SL", strategy.short, abs(strategy.position_size), stop=sl_price, comment="EXIT SL @ "+ tostring(sl_price))
if strategy.position_size < 0
strategy.cancel("EXIT at MBB", true)
strategy.cancel("EXIT at SL", true)
strategy.order("EXIT at MBB", strategy.long, abs(strategy.position_size), limit=exit_price, comment="EXIT TG @ "+ tostring(exit_price))
strategy.order("EXIT at SL", strategy.long, abs(strategy.position_size), stop=sl_price, comment="EXIT SL @ "+ tostring(sl_price))
// if intraday trade, close the trade at open of 15:15 candle //!!!!!!!!!!!!!!!!!!!!! TO BE CORRECTED !!!!!!!!!!!!!!!!!!!!!!!
if timeframe.isintraday and exit_inraday and hour == 15 and minute == 00
strategy.close("BUY", when=strategy.position_size > 0, qty=strategy.position_size, comment="EXIT @ "+ tostring(close))
strategy.close("SELL", when=strategy.position_size < 0, qty=strategy.position_size, comment="EXIT @ "+ tostring(close))
// ***********************************************************************************************************************
// plots
//
// plot BB
[mBBp,uBBp,lBBp] = getBB(0)
p_mBB = plot(show_bb_switch ? mBBp : na, color=color.teal)
p_uBB = plot(show_bb_switch ? uBBp : na, color=color.teal)
p_lBB = plot(show_bb_switch ? lBBp : na, color=color.teal)
fill(p_uBB,p_lBB,color=color.teal,transp=95)