এই কৌশলটি বুলিন ব্যান্ডের গতিশীলতার সূচক ব্যবহার করে বিট-ব্রেকিং ট্রেডিংয়ের জন্য ব্যবহৃত হয়, মূলত দামগুলি বুলিন ব্যান্ডকে ভেঙে নেমে যায় কিনা তা নির্ধারণ করে এবং একটি ক্রয়-বিক্রয় সংকেত প্রেরণ করে।
এই কৌশলটি মূলত ব্রাইন ব্যান্ডের নির্দেশকের উপর ভিত্তি করে ট্রেন্ডের দিক নির্ধারণ করে। ব্রাইন ব্যান্ডটি একটি ব্যান্ডযুক্ত অঞ্চল যা চলমান গড় এবং এর স্ট্যান্ডার্ড ডিফেন্স দ্বারা গঠিত। ব্রাইন ব্যান্ডের মধ্যম লাইনটি হল n দিনের চলমান গড়, উপরের ট্র্যাকটি হল মধ্যম লাইন + 2 গুণ স্ট্যান্ডার্ড ডিফেন্স, নীচের ট্র্যাকটি হল মধ্যম লাইন - 2 গুণ স্ট্যান্ডার্ড ডিফেন্স। যখন দামটি উপরের ট্র্যাকের কাছাকাছি আসে তখন ওভারবয় হয়, যখন এটি নীচের ট্র্যাকের কাছাকাছি আসে তখন ওভারসোল হয়।
বিশেষভাবে, কৌশলটি প্রথমে n দিনের সর্বোচ্চ এবং সর্বনিম্ন মূল্য গণনা করে এবং মধ্যম মূল্য গণনা করে ((( সর্বোচ্চ মূল্য + সর্বনিম্ন মূল্য) / 2) । তারপরে, মধ্যম মূল্যের কাছাকাছি মূল্য এবং মধ্যম মূল্যের দূরত্বের ওজনযুক্ত মুভিং গড়টি একটি ব্রিনের ব্যান্ডের মধ্যম লাইন গঠন করে। মধ্যম লাইনটি উপরে এবং নীচে 2x স্ট্যান্ডার্ড ডিফারেনশিয়াল গঠন করে।
যদি সমাপ্তি মূল্যের উত্থান হয়, তবে এটি একটি উচ্চতর প্রবণতা দেখায়; যদি এটি একটি নিম্ন প্রবণতা দেখায়, তবে এটি একটি নিম্ন প্রবণতা দেখায়। উচ্চতর প্রবণতা অতিক্রম করার সময় আরও কিছু করুন, নিম্নতর প্রবণতা অতিক্রম করার সময় খালি করুন।
এছাড়াও, কৌশলটি একটি বিপরীত পোজিশন খোলার প্রক্রিয়া প্রবর্তন করে। যখন দামগুলি ব্রাইন ব্যান্ডের ট্র্যাকের বাইরে চলে যায়, যদি MACD হ্রাস পায় তবে বিপরীত বাজার অপারেশনটি খালি করা হবে।
ব্রিন ব্যান্ডের সাহায্যে ট্রেন্ডের দিকনির্দেশনা করা যায়, এবং কিছু ট্রেন্ড ট্র্যাকিং ক্ষমতা থাকে।
বিপরীত পজিশনের নকশা বিপরীতমুখী মুনাফা অর্জন করতে পারে।
বিভিন্ন সময়ের লেনদেনের জন্য ব্রিনবেন্ডের সময়কাল, স্ট্যান্ডার্ড ডিফারেনশিয়ালের গুণিতক ইত্যাদির মতো প্যারামিটারগুলি কাস্টমাইজ করা যায়।
এই পজিশনের ঝুঁকি কমানোর জন্য এটি বন্ধ বা বিপরীতভাবে খোলা যেতে পারে।
ব্রিন ব্যান্ডগুলি সাধারণত উচ্চ ওঠানামাযুক্ত স্টকগুলির জন্য ব্যবহৃত হয় এবং দীর্ঘ-চক্রের রিসোর্স বা সূচকের মতো জাতের জন্য উপযুক্ত নাও হতে পারে। বিভিন্ন চক্রের প্যারামিটারগুলির কার্যকারিতা পরীক্ষা করা যেতে পারে।
ব্রেকিং সিগন্যাল হতে পারে মিথ্যা ব্রেকিং। অন্যান্য কারণের সাথে মিলিত হতে পারে ফিল্টারিং সিগন্যাল।
রিভার্স পোজিশন খোলার ফলে ক্ষতি আরও বাড়তে পারে। রিভার্স পোজিশন মডিউল বন্ধ করা যেতে পারে।
প্রত্যাহার বড় হতে পারে। পজিশন স্কেল যথাযথভাবে সামঞ্জস্য করা যেতে পারে।
প্রবণতা ফিল্টার ব্যবহার করা যেতে পারে, যাতে অস্পষ্ট দিকনির্দেশনা থেকে বাজারকে রক্ষা করা যায়।
ব্রিনের স্ট্যান্ডার্ড বিভাজন গুণিতক পরীক্ষা করে আরও উপযুক্ত প্যারামিটার খুঁজে বের করা যায়।
একক ক্ষতি নিয়ন্ত্রণের জন্য স্টপ লস কৌশল চালু করা যেতে পারে।
ট্রেডিং সিগন্যালকে আরও স্পষ্ট করার জন্য পজিশন খোলার এবং পজিশনিং লজিককে অপ্টিমাইজ করা যায়।
এই কৌশলটি ব্রিনের বেস সূচক হিসাবে ব্যবহার করা হয়, দামের প্রবণতা বিরতি নির্ধারণের জন্য ট্রেডিং করা হয়। সহজ প্যারামিটার সেট ব্যবহার করে আপনি মৌলিক প্রবণতা ট্র্যাকিং কৌশলটি অর্জন করতে পারেন। তবে একটি নির্দিষ্ট ভুয়া বিরতির ঝুঁকি রয়েছে, অন্যান্য সূচকগুলির সাথে মিলিতভাবে ফিল্টারিং করা প্রয়োজন। প্যারামিটার সেট, স্টপ লস কৌশল ইত্যাদি নিয়ন্ত্রণের জন্য আরও অপ্টিমাইজ করা যেতে পারে।
This strategy uses Bollinger Bands momentum indicator for breakout trading, mainly judging if price breaks through the upper or lower Bollinger Bands for trading signals.
The strategy is primarily based on Bollinger Bands indicator to determine trend direction. Bollinger Bands consist of a middle band based on a moving average and upper/lower bands defined by standard deviations. The middle band is a n-period moving average, the upper band is middle band + 2 standard deviations, and the lower band is middle band - 2 standard deviations. When price approaches the upper band it indicates overbought conditions, and when it approaches the lower band it signals oversold conditions.
Specifically, the strategy first calculates the highest high and lowest low over last n periods, and the middle price ((highest high + lowest low)/2). It then calculates the distance between close price and middle price, uses exponential moving average of the distance to form the middle band, and adds/subtracts 2 times standard deviation above and below to form the upper and lower bands.
When close price breaks through the upper band, it signals an uptrend; when it breaks the lower band, it signals a downtrend. The strategy goes long when the upper band is broken, and goes short when the lower band is broken.
In addition, the strategy incorporates a counter-trend mechanism. When price breaks the upper band but MACD is falling, it will take a counter-trend short position.
Using Bollinger Bands to determine trend direction provides certain trend following capability.
Counter-trend design allows profiting from reversals.
Customizable parameters like period and standard deviation multiples make it adaptable to different trading horizons.
Disable counter-trend trading to reduce risk.
Bollinger Bands work best for high volatility stocks, may not be suitable for stable commodities or indices. Can test different period parameters.
Breakout signals may have false breakouts. Can add filters with other indicators.
Counter-trend trading can further increase losses. Can disable counter-trend module.
Drawdowns may be significant. Can adjust position sizing.
Consider adding trend filter to avoid whipsaw in non-directional markets.
Test different standard deviation multiples to find optimal parameters.
Incorporate stop loss to control single trade loss.
Optimize entry and add-on logic for clearer trading signals.
The strategy uses Bollinger Bands as the primary indicator and trades based on trend breakouts. With simple parameters it provides basic trend following capabilities. But false breakout risks exist, requiring additional filters. Parameters, stop loss and risk controls can be enhanced. Overall it serves as a reasonable baseline breakout strategy.
/*backtest
start: 2023-08-18 00:00:00
end: 2023-09-17 00:00:00
period: 4h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//Noro
//2018
//@version=2
strategy("Noro's Bands Scalper Strategy v1.6", shorttitle = "Scalper str 1.6", overlay = true, default_qty_type = strategy.percent_of_equity, default_qty_value = 100.0, pyramiding = 0)
//Settings
needlong = input(true, defval = true, title = "Long")
needshort = input(true, defval = true, title = "Short")
takepercent = input(0, defval = 0, minval = 0, maxval = 1000, title = "take, %")
needbe = input(true, defval = true, title = "Bands Entry")
needct = input(false, defval = false, title = "Counter-trend entry")
bodylen = input(10, defval = 10, minval = 0, maxval = 50, title = "Body length")
trb = input(1, defval = 1, minval = 1, maxval = 5, title = "Trend bars")
len = input(20, defval = 20, minval = 2, maxval = 200, title = "Period")
needbb = input(true, defval = true, title = "Show Bands")
needbg = input(true, defval = true, title = "Show Background")
fromyear = input(1900, defval = 1900, minval = 1900, maxval = 2100, title = "From Year")
toyear = input(2100, defval = 2100, minval = 1900, maxval = 2100, title = "To Year")
frommonth = input(01, defval = 01, minval = 01, maxval = 12, title = "From Month")
tomonth = input(12, defval = 12, minval = 01, maxval = 12, title = "To Month")
src = close
//PriceChannel 1
lasthigh = highest(src, len)
lastlow = lowest(src, len)
center = (lasthigh + lastlow) / 2
//Distance
dist = abs(src - center)
distsma = sma(dist, len)
hd = center + distsma
ld = center - distsma
hd2 = center + distsma * 2
ld2 = center - distsma * 2
//Trend
chd = close > hd
cld = close < ld
uptrend = trb == 1 and chd ? 1 : trb == 2 and chd and chd[1] ? 1 : trb == 3 and chd and chd[1] and chd[2] ? 1 : trb == 4 and chd and chd[1] and chd[2] and chd[3] ? 1 : trb == 5 and chd and chd[1] and chd[2] and chd[3] and chd[4] ? 1 : 0
dntrend = trb == 1 and cld ? 1 : trb == 2 and cld and cld[1] ? 1 : trb == 3 and cld and cld[1] and cld[2] ? 1 : trb == 4 and cld and cld[1] and cld[2] and cld[3] ? 1 : trb == 5 and cld and cld[1] and cld[2] and cld[3] and cld[4] ? 1 : 0
trend = dntrend == 1 and high < center ? -1 : uptrend == 1 and low > center ? 1 : trend[1]
//trend = close < ld and high < center ? -1 : close > hd and low > center ? 1 : trend[1]
//Lines
colo = needbb == false ? na : black
plot(hd2, color = colo, linewidth = 1, transp = 0, title = "High band 2")
plot(hd, color = colo, linewidth = 1, transp = 0, title = "High band 1")
plot(center, color = colo, linewidth = 1, transp = 0, title = "center")
plot(ld, color = colo, linewidth = 1, transp = 0, title = "Low band 1")
plot(ld2, color = colo, linewidth = 1, transp = 0, title = "Low band 2")
//Background
col = needbg == false ? na : trend == 1 ? lime : red
bgcolor(col, transp = 80)
//Body
body = abs(close - open)
smabody = ema(body, 30) / 10 * bodylen
//Signals
bar = close > open ? 1 : close < open ? -1 : 0
up7 = trend == 1 and ((bar == -1 and bar[1] == -1) or (body > smabody and bar == -1)) ? 1 : 0
dn7 = trend == 1 and ((bar == 1 and bar[1] == 1) or (close > hd and needbe == true)) and close > strategy.position_avg_price * (100 + takepercent) / 100 ? 1 : 0
up8 = trend == -1 and ((bar == -1 and bar[1] == -1) or (close < ld2 and needbe == true)) and close < strategy.position_avg_price * (100 - takepercent) / 100 ? 1 : 0
dn8 = trend == -1 and ((bar == 1 and bar[1] == 1) or (body > smabody and bar == 1)) ? 1 : 0
if up7 == 1 or up8 == 1
strategy.entry("Long", strategy.long, needlong == false ? 0 : trend == -1 and needct == false ? 0 : na, when=(time > timestamp(fromyear, frommonth, 01, 00, 00) and time < timestamp(toyear, tomonth, 31, 00, 00)))
if dn7 == 1 or dn8 == 1
strategy.entry("Short", strategy.short, needshort == false ? 0 : trend == 1 and needct == false ? 0 : na, when=(time > timestamp(fromyear, frommonth, 01, 00, 00) and time < timestamp(toyear, tomonth, 31, 00, 00)))
if time > timestamp(toyear, tomonth, 31, 00, 00)
strategy.close_all()