
Let me analyze this trading strategy code and create a comprehensive article in both Chinese and English as requested.
یہ حکمت عملی ایک جامع تجارتی نظام ہے جس میں پیرالی لائن ایس اے آر اشارے ، سپر ٹرینڈ اشارے اور حجم اوسکولیٹر شامل ہیں۔ یہ حکمت عملی بنیادی طور پر مارکیٹ کے رجحانات کی تصدیق کے لئے کثیر جہتی تکنیکی اشارے کے ذریعہ ، اشارے کے مابین باہمی توثیق کے ذریعہ تجارتی سگنل کی وشوسنییتا کو بہتر بناتی ہے۔ حکمت عملی کے ڈیزائن کا بنیادی خیال رجحان ، رفتار اور حجم کی تین جہتوں پر سگنل کی تصدیق کرنا ہے ، اور صرف اس صورت میں تجارت کی جاتی ہے جب تینوں جہتوں میں ایک ہی سگنل موجود ہو۔
اس حکمت عملی میں تین بنیادی اشارے استعمال کیے گئے ہیں:
ٹریڈنگ سگنل جنریشن منطق:
اس حکمت عملی میں رجحانات کی پیروی اور حجم تجزیہ کو ملا کر ایک نسبتا complete مکمل تجارتی نظام بنایا گیا ہے۔ اس حکمت عملی کی بنیادی خصوصیت یہ ہے کہ متعدد اشارے کی تصدیق کا استعمال کرکے تجارت کی وشوسنییتا کو بہتر بنایا جائے ، جبکہ تاجر کو بصری ڈیزائن کے ذریعہ بصری فیصلہ سازی کا حوالہ فراہم کیا جائے۔ اگرچہ کچھ پسماندگی اور پیرامیٹر حساسیت کے مسائل ہیں ، لیکن معقول اصلاح اور خطرے سے متعلق اقدامات کے ذریعہ اس حکمت عملی میں اچھی عملی قدر ہے۔
//@version=5
strategy("Parabolic SAR + SuperTrend + Volume Oscillator Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// --- Parabolic SAR Parameters ---
sar_start = 0.02
sar_increment = 0.02
sar_max = 0.2
sar = ta.sar(sar_start, sar_increment, sar_max)
plot(sar, color=color.red, style=plot.style_cross, title="Parabolic SAR")
// --- SuperTrend Parameters ---
st_length = 10
st_multiplier = 3
[st_upper, st_lower] = ta.supertrend(st_length, st_multiplier)
st_color = close > st_upper ? color.green : color.red
plot(st_upper, color=color.new(st_color, 0), title="SuperTrend Upper")
plot(st_lower, color=color.new(st_color, 0), title="SuperTrend Lower")
fill(plot(st_upper), plot(st_lower), color=color.new(st_color, 90), title="SuperTrend Cloud")
// --- Volume Oscillator Parameters ---
vo_short_length = 14
vo_long_length = 28
vo = ta.ema(volume, vo_short_length) - ta.ema(volume, vo_long_length)
plot(vo, color=color.blue, title="Volume Oscillator")
// --- Buy and Sell Conditions ---
// Buy Condition:
// - Price is above Parabolic SAR
// - SuperTrend is bullish (price above SuperTrend lower line)
// - Volume Oscillator is positive (indicating increasing volume)
buyCondition = close > sar and close > st_lower and vo > 0
// Sell Condition:
// - Price is below Parabolic SAR
// - SuperTrend is bearish (price below SuperTrend upper line)
// - Volume Oscillator is negative (indicating decreasing volume)
sellCondition = close < sar and close < st_upper and vo < 0
// Plot Buy/Sell Signals
plotshape(series=buyCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(series=sellCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// --- Execute Trades ---
if (buyCondition)
strategy.entry("Long", strategy.long)
if (sellCondition)
strategy.close("Long")