
یہ حکمت عملی بروئنگ بینڈ اشارے پر مبنی ایک چار گھنٹے کی سطح پر مقداری تجارتی نظام ہے ، جس میں رجحانات کو توڑنے اور اوسط واپسی کے ساتھ تجارت کا نظریہ شامل ہے۔ حکمت عملی مارکیٹ کی حرکیات کو بروئنگ کے نیچے کی طرف سے توڑنے کے ذریعے پکڑتی ہے ، جبکہ قیمت کی واپسی کی اوسط کی خصوصیات کو فائدہ اٹھانے کے لئے فائدہ اٹھاتی ہے ، اور خطرے کو روکنے کے ذریعہ کنٹرول کرتی ہے۔ حکمت عملی میں 3 گنا بیئر استعمال کیا جاتا ہے ، منافع کو یقینی بنانے کے ساتھ ساتھ خطرے کو کنٹرول کرنے پر بھی پوری طرح غور کیا جاتا ہے۔
حکمت عملی کی بنیادی منطق درج ذیل کلیدی عناصر پر مبنی ہے:
یہ ایک ایسی حکمت عملی ہے جو برن بینڈ اشارے کی رجحان کی پیروی اور اوسط واپسی کی خصوصیات کو جوڑتی ہے ، جس میں سخت کھلی پوزیشن کی شرائط اور رسک کنٹرول اقدامات کے ذریعہ مستحکم منافع حاصل کرنے کا مقصد حاصل کیا جاتا ہے۔ حکمت عملی کا بنیادی فائدہ اس کی واضح تجارتی منطق اور بہتر رسک کنٹرول سسٹم میں ہے ، لیکن اس حکمت عملی کی استحکام اور آمدنی کی صلاحیت کو مزید بڑھانے کے لئے لیورج استعمال اور مارکیٹ کے ماحول کے فیصلے جیسے اصلاحات پر بھی توجہ دینے کی ضرورت ہے۔
/*backtest
start: 2019-12-23 08:00:00
end: 2024-12-10 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Bollinger 4H Follow", overlay=true, initial_capital=300, commission_type=strategy.commission.percent, commission_value=0.04)
// StartYear = input(2022,"Backtest Start Year")
// StartMonth = input(1,"Backtest Start Month")
// StartDay = input(1,"Backtest Start Day")
// testStart = timestamp(StartYear,StartMonth,StartDay,0,0)
// EndYear = input(2023,"Backtest End Year")
// EndMonth = input(12,"Backtest End Month")
// EndDay = input(31,"Backtest End Day")
// testEnd = timestamp(EndYear,EndMonth,EndDay,0,0)
lev = 3
// Input parameters
length = input.int(20, title="Bollinger Band Length")
mult = input.float(2.0, title="Bollinger Band Multiplier")
// Bollinger Bands calculation
basis = ta.sma(close, length)
upperBand = basis + mult * ta.stdev(close, length)
lowerBand = basis - mult * ta.stdev(close, length)
// Conditions for Open Long
openLongCondition = strategy.position_size == 0 and close > open and (close + open) / 2 > upperBand
// Conditions for Open Short
openShortCondition = strategy.position_size == 0 and close < open and (close + open) / 2 < lowerBand
// Conditions for Close Long
closeLongCondition = strategy.position_size > 0 and strategy.position_size > 0 and (close < upperBand and open < upperBand and close < open)
// Conditions for Close Short
closeShortCondition = strategy.position_size < 0 and strategy.position_size < 0 and (close > lowerBand and open > lowerBand and close > open)
// Long entry
if openLongCondition
strategy.entry("Long", strategy.long, qty=strategy.equity * lev / close)
strategy.exit("Long SL", from_entry="Long", stop=low) // Set Stop-Loss
// Short entry
if openShortCondition
strategy.entry("Short", strategy.short, qty=strategy.equity * lev / close)
strategy.exit("Short SL", from_entry="Short", stop=high) // Set Stop-Loss
// Long exit
if closeLongCondition
strategy.close("Long", comment = "TP")
// Short exit
if closeShortCondition
strategy.close("Short", comment = "TP")
// Plot Bollinger Bands
plot(upperBand, color=color.yellow, title="Upper Band")
plot(lowerBand, color=color.yellow, title="Lower Band")