
یہ حکمت عملی بنیادی طور پر ایک مخصوص K لائن کی شکل کی نشاندہی کرکے مارکیٹ کے ممکنہ الٹ پوائنٹس کا فیصلہ کرتی ہے۔ پن بار ایک K لائن کی شکل ہے جس میں لمبی سائے کی لائن اور چھوٹی ہستی شامل ہوتی ہے ، جس سے یہ ظاہر ہوتا ہے کہ مارکیٹ میں اس مقام پر زیادہ اتار چڑھاؤ ہوا ہے ، لیکن آخر میں قیمت پیچھے ہٹ گئی ہے ، جس سے یہ ظاہر ہوتا ہے کہ یہ مقام معاون یا مزاحمتی مقام ہوسکتا ہے۔ یہ حکمت عملی موجودہ رجحان کی سمت کا فیصلہ کرنے کے لئے 50 سیکنڈ کی سادہ حرکت پذیری اوسط ((SMA) کا استعمال کرتی ہے ، اور 20 سیکنڈ کی SMA کو حجم فلٹرنگ کی شرط کے طور پر استعمال کرتی ہے ، اور صرف اس اوسط لائن سے زیادہ تجارت کو ایک مؤثر سگنل سمجھا جاتا ہے جب پن بار ظاہر ہوتا ہے۔ اس کے علاوہ ، یہ حکمت عملی نسبتا strong مضبوط کمزور اشارے ((RSI) کا بھی حساب لگاتی ہے ، لیکن براہ راست انٹری اور آؤٹ شرائط میں استعمال نہیں ہوتی ہے ، بلکہ اس کے بجائے مزید قابل عمل سگنل کی شرط کے طور پر منتخب کیا جاتا ہے۔
پن بار الٹ حکمت عملی نے سادہ اور موثر سوچ کو اپنایا ہے ، جس نے رجحان فلٹرنگ ، حجم فلٹرنگ اور اسی طرح کے طریقوں سے سگنل کی شناخت کی درستگی کو بہتر بنایا ہے۔ اگرچہ ابھی کچھ جگہیں ہیں جہاں بہتری آسکتی ہے ، لیکن مجموعی طور پر یہ سوچ قابل عمل ہے اور مزید اصلاحی جانچ کے قابل ہے۔ پن بار خود ایک کلاسک قیمت کی شکل کے طور پر ، دوسرے اشارے یا سگنل کے ساتھ مل کر بھی استعمال کیا جاسکتا ہے ، تاکہ ایک زیادہ مستحکم تجارتی نظام حاصل کیا جاسکے۔
/*backtest
start: 2024-05-01 00:00:00
end: 2024-05-31 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Filtered Pin Bar Strategy with Relaxed Volume", overlay=true)
// Define the size of the pin bar's wick and body
wickSize = 0.6
bodySize = 0.3
// Calculate the size of the wicks and body
upperWick = high - math.max(open, close)
lowerWick = math.min(open, close) - low
body = math.abs(close - open)
// Define a simple moving average to determine the trend
smaLength = 50
sma = ta.sma(close, smaLength)
// Define a more relaxed volume threshold
volumeThreshold = ta.sma(volume, 20) * 1.0
// Define RSI parameters
rsiLength = 14
rsiOverbought = 70
rsiOversold = 30
rsi = ta.rsi(close, rsiLength)
// Define the conditions for a bullish pin bar
bullishPinBar = (lowerWick > (wickSize * (high - low))) and
(body < (bodySize * (high - low))) and
(close > open) and
(close > sma) and
(volume > volumeThreshold)
// Define the conditions for a bearish pin bar
bearishPinBar = (upperWick > (wickSize * (high - low))) and
(body < (bodySize * (high - low))) and
(close < open) and
(close < sma) and
(volume > volumeThreshold)
// Plot the bullish and bearish pin bars on the chart
plotshape(series=bullishPinBar, title="Bullish Pin Bar", location=location.belowbar, color=color.green, style=shape.labelup, text="PB")
plotshape(series=bearishPinBar, title="Bearish Pin Bar", location=location.abovebar, color=color.red, style=shape.labeldown, text="PB")
// Entry and exit rules
if (bullishPinBar)
strategy.entry("Bullish Pin Bar", strategy.long)
if (bearishPinBar)
strategy.entry("Bearish Pin Bar", strategy.short)
// Optional: Set stop loss and take profit
stopLoss = 2 * body
takeProfit = 3 * body
strategy.exit("Exit Long", from_entry="Bullish Pin Bar", stop=low - stopLoss, limit=high + takeProfit)
strategy.exit("Exit Short", from_entry="Bearish Pin Bar", stop=high + stopLoss, limit=low - takeProfit)