
এই কৌশলটি মূলত একটি নির্দিষ্ট কে-লাইন মোড - পিন বার সনাক্ত করে সম্ভাব্য বাজার বিপরীত দিকের বিচার করে। পিন বার হ’ল একটি কে-লাইন মোড যা দীর্ঘ ছায়া এবং ছোট সত্তাগুলি নিয়ে গঠিত, যা নির্দেশ করে যে বাজারে এই বিন্দুতে প্রচুর ওঠানামা রয়েছে, তবে শেষ পর্যন্ত দামের প্রত্যাবর্তন, যা দেখায় যে এই বিন্দুটি সমর্থন বা প্রতিরোধের হতে পারে। এই কৌশলটি বর্তমান প্রবণতার দিকনির্দেশের জন্য 50 চক্রের সরল চলমান গড় ((এসএমএ) ব্যবহার করে এবং 20 চক্রের এসএমএ ব্যবহার করে ট্রেডিং ভলিউম ফিল্টার শর্ত হিসাবে, কেবলমাত্র যখন পিন বার উপস্থিত হয় তখন ট্রেডিং ভলিউম এই গড়ের চেয়ে বড় হয় তখনই কার্যকর সংকেত হিসাবে বিবেচিত হয়। তদ্ব্যতীত, কৌশলটি একটি অপেক্ষাকৃত শক্তিশালী সূচক ((আরএসআই) গণনা করে, তবে সরাসরি প্রবেশ এবং প্রস্থান শর্তে নয়, বরং আরও পিনযোগ্য সংকেতের শর্ত হিসাবে নির্বাচিত হয়।
পিন বার বিপরীতকরণ কৌশলটি সহজ এবং কার্যকর চিন্তাভাবনা গ্রহণ করে, প্রবণতা ফিল্টারিং, লেনদেনের পরিমাণ ফিল্টারিং ইত্যাদির মাধ্যমে সংকেত সনাক্তকরণের যথার্থতা বাড়ায়। যদিও এখনও কিছু উন্নতি করা যায়, তবে সামগ্রিক চিন্তাভাবনাটি কার্যকর এবং আরও অপ্টিমাইজেশান পরীক্ষার জন্য উপযুক্ত। পিন বার নিজেই একটি ক্লাসিক মূল্যের আকার হিসাবে, এটি অন্যান্য সূচক বা সংকেতগুলির সাথে একত্রিত হতে পারে, যাতে আরও স্থিতিশীল লেনদেনের ব্যবস্থা পাওয়া যায়।
/*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)