
এই কৌশলটি একটি ট্রেডিং ভলিউম এবং দামের পরিবর্তনের উপর ভিত্তি করে একটি ট্রেন্ড ট্র্যাকিং সিস্টেম, যা নেট ট্র্যাফিক ভলিউম স্ট্রাইক সূচক (NVO) গণনা করে বাজারের গতিপথের পূর্বাভাস দেয়। কৌশলটি একাধিক মুভিং এভারেজ টাইপ (EMA, WMA, SMA, HMA) এর সাথে স্ট্রাইক সূচকটির অবস্থানগত সম্পর্কের তুলনা করে বাজারের প্রবণতা নির্ধারণ করে এবং উপযুক্ত সময়ে বাণিজ্য করে। কৌশলটি ঝুঁকি নিয়ন্ত্রণ এবং মুনাফা লক করার জন্য স্টপ লস এবং স্টপ স্টপ মেশিনও অন্তর্ভুক্ত করে।
কৌশলটির মূল বিষয় হল প্রতিদিনের নিট লেনদেনের পরিমাণের অস্থিরতার মান গণনা করে বাজারের মনোভাব নির্ধারণ করা। নিম্নলিখিত পদক্ষেপগুলি গণনা করা হয়ঃ
ট্রেডিং সিগন্যালের উৎপত্তি নিম্নলিখিত নিয়মের উপর ভিত্তি করেঃ
ঝুঁকি নিয়ন্ত্রণের পরামর্শ:
সিগন্যাল কনফার্মেশন মেকানিজম অপ্টিমাইজ করা হয়েছেঃ
ঝুঁকি ব্যবস্থাপনা অপ্টিমাইজেশান:
প্যারামিটার অপ্টিমাইজেশানঃ
এই কৌশলটি একটি সম্পূর্ণ ট্রেডিং সিস্টেম তৈরি করে যা ট্রেডিং ভলিউম এবং দামের ডেটা বিশ্লেষণ করে। কৌশলটির প্রধান বৈশিষ্ট্য হ’ল এটি একাধিক প্রযুক্তিগত সূচককে একত্রিত করে এবং এটি নমনীয় প্যারামিটার কনফিগারেশন বিকল্প সরবরাহ করে। যদিও কিছু ঝুঁকি রয়েছে, তবে যুক্তিসঙ্গত ঝুঁকি নিয়ন্ত্রণ এবং ক্রমাগত অপ্টিমাইজেশনের মাধ্যমে কৌশলটি বাস্তব ব্যবসায়ের ক্ষেত্রে স্থিতিশীল উপার্জনের প্রত্যাশিত। ব্যবসায়ীদের রিয়েল-টাইমে ব্যবহারের আগে পর্যাপ্ত ফিডব্যাক করার পরামর্শ দেওয়া হয় এবং নির্দিষ্ট বাজারের পরিস্থিতি অনুসারে প্যারামিটারগুলি যথাযথভাবে সামঞ্জস্য করা হয়।
/*backtest
start: 2024-02-25 00:00:00
end: 2025-02-22 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Binance","currency":"SOL_USDT"}]
*/
//@version=5
strategy("EMA-Based Net Volume Oscillator with Trend Change", shorttitle="NVO Trend Change", overlay=false, initial_capital=100000, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// Input parameters
maType = input.string("WMA", "Moving Average Type", options=["WMA", "EMA", "SMA", "HMA"])
maLength = input.int(21, "MA Length", minval=1)
emaOverlayLength = input.int(9, "EMA Overlay Length", minval=1)
oscillatorMultiplier = input.float(1.0, "Oscillator Multiplier", minval=0.1, step=0.1)
showHistogram = input.bool(true, "Show Histogram")
stopLossPerc = input.float(1.0, "Stop Loss (%)", tooltip="Set 999 to disable")
takeProfitPerc = input.float(2.0, "Take Profit (%)", tooltip="Set 999 to disable")
// Calculate Net Volume Oscillator
priceRange = high - low
multiplier = priceRange > 0 ? (close - low) / priceRange : 0.5
var float effectiveUpVol = 0.0
var float effectiveDownVol = 0.0
if close > close[1]
effectiveUpVol := volume * multiplier
effectiveDownVol := volume * (1 - multiplier)
else if close < close[1]
effectiveUpVol := volume * multiplier
effectiveDownVol := volume * (1 - multiplier)
else
effectiveUpVol := 0.0
effectiveDownVol := 0.0
netVolume = effectiveUpVol - effectiveDownVol
dailyNetOscillator = volume > 0 ? (netVolume / volume) * 100 : 0
// Apply selected Moving Average
var float oscillator = na
if maType == "WMA"
oscillator := ta.wma(dailyNetOscillator, maLength) * oscillatorMultiplier
else if maType == "EMA"
oscillator := ta.ema(dailyNetOscillator, maLength) * oscillatorMultiplier
else if maType == "SMA"
oscillator := ta.sma(dailyNetOscillator, maLength) * oscillatorMultiplier
else if maType == "HMA"
oscillator := ta.hma(dailyNetOscillator, maLength) * oscillatorMultiplier
// EMA Overlay
emaOverlay = ta.ema(oscillator, emaOverlayLength)
// Rate of Change (ROC) for Oscillator
roc = ta.roc(oscillator, 1) // 1-period rate of change
// Trading logic
longCondition = oscillator > emaOverlay
shortCondition = oscillator < emaOverlay
// Exit conditions
exitLong = oscillator < emaOverlay and strategy.position_size > 0
exitShort = oscillator > emaOverlay and strategy.position_size < 0
// Execute trades
if longCondition and strategy.position_size <= 0
strategy.entry("Long", strategy.long)
if exitLong
strategy.close("Long")
if shortCondition and strategy.position_size >= 0
strategy.entry("Short", strategy.short)
if exitShort
strategy.close("Short")
// Stop Loss and Take Profit
stopLossLong = stopLossPerc != 999 ? strategy.position_avg_price * (1 - stopLossPerc/100) : na
takeProfitLong = takeProfitPerc != 999 ? strategy.position_avg_price * (1 + takeProfitPerc/100) : na
stopLossShort = stopLossPerc != 999 ? strategy.position_avg_price * (1 + stopLossPerc/100) : na
takeProfitShort = takeProfitPerc != 999 ? strategy.position_avg_price * (1 - takeProfitPerc/100) : na
if (not na(stopLossLong) and not na(takeProfitLong) and strategy.position_size > 0)
strategy.exit("Long SL/TP", "Long", stop=stopLossLong, limit=takeProfitLong)
if (not na(stopLossShort) and not na(takeProfitShort) and strategy.position_size < 0)
strategy.exit("Short SL/TP", "Short", stop=stopLossShort, limit=takeProfitShort)
// Plotting
plot(oscillator, "Net Volume Oscillator", color.blue)
plot(emaOverlay, "EMA Overlay", color.orange)
hline(0, "Zero Line", color.gray)
// Histogram with Trend Change Visualization
var color histogramColor = na
if oscillator > 0
histogramColor := roc >= 0 ? color.new(color.green, 70) : color.new(color.lime, 70) // Green for bullish, light green for weakening
else if oscillator < 0
histogramColor := roc >= 0 ? color.new(color.red, 70) : color.new(color.maroon, 70) // Red for bearish, light red for weakening
plot(showHistogram ? oscillator : na, style=plot.style_histogram, color=histogramColor, title="Histogram")