
اس حکمت عملی میں ویکٹر موم بتیوں کے تصور کو روایتی چینل بریک آؤٹ اور چاکلیٹ چٹنی کے نمونوں کی شناخت کے ساتھ ملایا گیا ہے۔ اس حکمت عملی کا مقصد مارکیٹ میں ہونے والی بریکنگ حرکتوں کو پکڑنا ہے۔ حکمت عملی نے پہلے کی K لائن کی اونچائی اور نچلی قیمتوں کا موازنہ کرتے ہوئے ، اور حجم میں اضافے والے ویکٹر موم بتیوں کو جوڑ کر سگنل کی تصدیق کی ، جبکہ شور کو فلٹر کرنے کے لئے ایک خاص تعداد میں تصدیق شدہ K لائنوں کا استعمال کیا۔
اس حکمت عملی میں ویکٹر فلٹرنگ کو کلاسیکی چینل بریک اور چوچ ماڈل کے ساتھ ملایا گیا ہے ، جس سے رنگ کے فرق اور تصدیق کے لائن میکانزم کے ذریعہ سگنل کی وشوسنییتا اور شناخت میں اضافہ ہوتا ہے۔ حکمت عملی کی خوبی یہ ہے کہ قواعد واضح ہیں ، سگنل بدیہی ہیں ، لیکن اس میں کچھ لچک اور اصلاح کی گنجائش ہے۔ تاہم ، اس حکمت عملی میں کچھ حدود اور خطرات بھی موجود ہیں ، جیسے چونکانے والی مارکیٹ میں ناقص کارکردگی ، مارکیٹ کے رجحانات کی ناکافی گرفت ، اور نقصانات کو روکنے کے انتظام کی کمی۔ مستقبل میں ، اس حکمت عملی کو رجحانات کی شناخت ، حد کی تجارت ، پیرامیٹرز کی اصلاح ، اور خطرے پر قابو پانے کے لئے بہتر اور مستحکم تجارتی کارکردگی حاصل کرنے کے لئے استعمال کیا جاسکتا ہے۔
/*backtest
start: 2024-02-01 00:00:00
end: 2024-02-29 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
strategy("Custom ChoCH and BOS Strategy with Vector Candles", overlay=true)
// Input Parameters
length = input(10, title="Lookback Length for Volume")
volMultiplier = input(2.0, title="Volume Multiplier for Vector Candles")
confirmationCandles = input(3, title="Confirmation Candles")
// Calculate the average volume of the last 'length' candles
avgVol = sma(volume, length)
// Vector Candle Definitions
vectorCandleRed = (close < open) and (volume > avgVol * volMultiplier) ? 1.0 : 0.0
vectorCandleGreen = (close > open) and (volume > avgVol * volMultiplier) ? 1.0 : 0.0
vectorCandleBlue = (close < open) and (volume > avgVol * 1.5) ? 1.0 : 0.0 // 150% volume for blue
vectorCandlePurple = (close > open) and (volume > avgVol * 1.5) ? 1.0 : 0.0 // 150% volume for purple
// Detecting BOS and ChoCH
isRedChoCH = vectorCandleRed > 0 and (close < low[1]) // Red ChoCH
isGreenBOS = vectorCandleGreen > 0 and (close > high[1]) // Green BOS
// Confirmation Logic
redChoCHConfirmed = (sum(vectorCandleRed, confirmationCandles) >= 2) ? 1.0 : 0.0
greenBOSConfirmed = (sum(vectorCandleGreen, confirmationCandles) >= 2) ? 1.0 : 0.0
// Entry Conditions
buyCondition = redChoCHConfirmed > 0
sellCondition = greenBOSConfirmed > 0
// Strategy Execution
if (buyCondition)
strategy.entry("Buy", strategy.long)
if (sellCondition)
strategy.close("Buy")
// Plotting Vector Candles and Signals
plotshape(series=isRedChoCH, title="Red ChoCH Signal", location=location.belowbar, color=color.red, style=shape.circle, text="Red ChoCH")
plotshape(series=isGreenBOS, title="Green BOS Signal", location=location.abovebar, color=color.green, style=shape.circle, text="Green BOS")
// Plotting Vector Candles for Visualization
plotchar(vectorCandleRed > 0, title="Vector Candle Red", location=location.belowbar, color=color.red, char='R', text="Red")
plotchar(vectorCandleGreen > 0, title="Vector Candle Green", location=location.abovebar, color=color.green, char='G', text="Green")
plotchar(vectorCandleBlue > 0, title="Vector Candle Blue", location=location.belowbar, color=color.blue, char='B', text="Blue")
plotchar(vectorCandlePurple > 0, title="Vector Candle Purple", location=location.abovebar, color=color.purple, char='P', text="Purple")