এই কৌশলটি ডাবল ফ্ল্যাশড মুভিং এভারেজ সিস্টেমকে প্রধান ট্রেডিং সিগন্যাল হিসাবে ব্যবহার করে এবং ট্রেডিং ভলিউম যাচাইকরণ সূচক টিডিএফআই-এর সাথে ট্রেডিং সিগন্যাল ফিল্টার করে, যাতে ফ্ল্যাশড মুভিং এভারেজের সুবিধা নেওয়া যায় এবং অপ্রচলিত বাজারের পরিবেশে ভুল লেনদেন হ্রাস করা যায়।
এই কৌশলটি মূল ট্রেডিং সিগন্যাল হিসাবে দুটি সেট বিভিন্ন প্যারামিটার সেট সমতল চলমান গড় গ্রুপ ব্যবহার করে। প্রথমে প্রথম নিশ্চিতকরণ সিগন্যাল হিসাবে একটি দ্রুত সেট 8 পিস সমতল চলমান গড় গ্রুপ ব্যবহার করে, তারপরে দ্বিতীয় নিশ্চিতকরণ সিগন্যাল হিসাবে কিছুটা ধীর 16 পিস সমতল চলমান গড় ব্যবহার করে। যখন একটি দ্রুত চলমান গড় একটি ক্রয় সংকেত দেয়, যদি একটি ধীর চলমান গড়ও একই দিক থেকে সংকেত দেয় এবং সর্বশেষ 1 থেকে 2 কে লাইনের মধ্যে থাকে তবে আরও বেশি পজিশন খোলা হয়; যখন একটি দ্রুত চলমান গড় একটি বিক্রয় সংকেত দেয়, যদি একটি ধীর চলমান গড়ও একই দিক থেকে সংকেত দেয় এবং সর্বশেষ 1 থেকে 2 কে লাইনের মধ্যে থাকে তবে পজিশন খালি হয়। পজিশন খালি করার জন্য দ্বিতীয় সংকেতটি নিশ্চিতকরণ সংকেতকে বিপরীতভাবে ভেঙে যায়।
Above risks কমানোর জন্য নিম্নলিখিত অপ্টিমাইজেশান দিকগুলি বিবেচনা করা যেতে পারেঃ
এই কৌশলটি সামগ্রিকভাবে একটি প্রচলিত ট্রেন্ড ট্র্যাকিং কৌশল। ডাবল ফ্ল্যাশড মুভিং এভারেজ সিস্টেমটি ট্রেডিং ভলিউম ফিল্টারিং সূচক টিডিএফআইয়ের সাথে মিলিত হয়ে ট্রেন্ড ট্র্যাকিংয়ের কার্যকারিতা আরও ভালভাবে সম্পাদন করতে পারে এবং অ-প্রধান প্রচলিত পরিস্থিতিতে ভুল সংকেত হারকে হ্রাস করতে পারে। প্যারামিটার অপ্টিমাইজেশনের মাধ্যমে, এটি বিভিন্ন সময়কাল এবং জাতের বাজারের বৈশিষ্ট্যগুলির সাথে খাপ খাইয়ে নিতে পারে। তবে এই কৌশলটি যান্ত্রিকভাবে প্রয়োগের পরিবর্তে প্যারামিটার সামঞ্জস্যের উপর বেশি নির্ভর করে। বিপরীত পয়েন্টগুলি সনাক্তকরণ এবং কৌশলটির কার্যকারিতার উপর প্যারামিটার সামঞ্জস্যের অভাবের দিকে মনোযোগ দেওয়া দরকার। সামগ্রিকভাবে, এই কৌশলটির ধারণাগুলি পরিষ্কার এবং সহজেই বোঝা যায় এবং আরও অপ্টিমাইজ করা উচিত।
/*backtest
start: 2022-10-06 00:00:00
end: 2023-10-12 00:00:00
period: 2d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=3
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Designed per No Nonsense Forex VP rules
//Made to be as modular as possible, so we can swap the indicators in and out.
//Originated from causecelebre
//Tried to put in as much VP rules as possible
///////////////////////////////////////////////////
//Rules Implemented:
///////////////////////////////////////////////////
// - SL 1.5 x ATR
// - TP 1 x ATR
//
// - Entry conditions
//// - Entry within first confirmation cross over and 1 candle of second confirmation + volume
// - Exit conditions
//// - Exit on exit indicator or when baseline or confirmation flip
///////////////////////////////////////////////////
//Trades entries
///////////////////////////////////////////////////
// - First entry L1 or S1 with standard SL and TP
///////////////////////////////////////////////////
//Included Indicators and settings
///////////////////////////////////////////////////
// - Confirmtion = SSL 8, 16
// - Volume = TDFI 6
///////////////////////////////////////////////////
//Credits
// Strategy causecelebre https://www.tradingview.com/u/causecelebre/
// TDFI causecelebre https://www.tradingview.com/u/causecelebre/
// SSL Channel ErwinBeckers https://www.tradingview.com/u/ErwinBeckers/
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// strategy(title="NNFX Strategy 3 Indicator Template | jh", overlay = true, pyramiding=0, initial_capital=20000, currency=currency.USD, calc_on_order_fills=0,default_qty_type=strategy.fixed, default_qty_value=10000)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// **** Set the main stuff ****
///////////////////////////////////////////////////
//Price
price = close
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ATR stuff
///////////////////////////////////////////////////
slMultiplier = input(1.5, "SL")
tpMultiplier = input(1, "TP")
atrlength = input(title="ATR Length", defval=14, minval=1)
atrsmoothing = input(title="Smoothing", defval="SMA", options=["RMA", "SMA", "EMA", "WMA"])
ma_function(source, atrlength) =>
if atrsmoothing == "RMA"
rma(source, atrlength)
else
if atrsmoothing == "SMA"
sma(source, atrlength)
else
if atrsmoothing == "EMA"
ema(source, atrlength)
else
wma(source, atrlength)
//plot(ma_function(tr(true), atrlength), title = "ATR", color=#991515, transp=0)
atr = ma_function(tr(true), atrlength)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// **** Confirmation 1 Fast ****
///////////////////////////////////////////////////
///////////////////////////////////////////////////
//SSL 6
///////////////////////////////////////////////////
ssllen1=input(title="SSL 1 Length Period", defval=8)
smaHigh1=sma(high, ssllen1)
smaLow1=sma(low, ssllen1)
Hlv1 = na
Hlv1 := close > smaHigh1 ? 1 : close < smaLow1 ? -1 : Hlv1[1]
sslDown1 = Hlv1 < 0 ? smaHigh1: smaLow1
sslUp1 = Hlv1 < 0 ? smaLow1 : smaHigh1
plot(sslDown1, "SSL Down", linewidth=1, color=red)
plot(sslUp1, "SSL Up", linewidth=1, color=lime)
///////////////////////////////////////////////////
//Confirm Signals
///////////////////////////////////////////////////
c_Up = sslUp1
c_Down =sslDown1
//Signals based on crossover
c_cross_Long = crossover(c_Up, c_Down)
c_cross_Short = crossover(c_Down, c_Up)
//Signals based on signal position
c_trend_Long = c_Up > c_Down ? 1 : 0
c_trend_Short = c_Down > c_Up ? 1 : 0
confirm_Long = c_cross_Long
confirm_Short = c_cross_Short
plotshape(c_cross_Long, color = green, style=shape.triangleup, location=location.top)
plotshape(c_cross_Short, color = red, style=shape.triangledown, location=location.top)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// **** Confirmation 2 Slow ****
///////////////////////////////////////////////////
///////////////////////////////////////////////////
//SSL 30
///////////////////////////////////////////////////
///////////////////////////////////////////////////
//SSL
///////////////////////////////////////////////////
ssllen2=input(title="SSL 2 Length Period", defval=16)
smaHigh2=sma(high, ssllen2)
smaLow2=sma(low, ssllen2)
Hlv2 = na
Hlv2 := close > smaHigh2 ? 1 : close < smaLow2 ? -1 : Hlv2[1]
sslDown2 = Hlv2 < 0 ? smaHigh2: smaLow2
sslUp2 = Hlv2 < 0 ? smaLow2 : smaHigh2
plot(sslDown2, "SSL Down", linewidth=1, color=orange)
plot(sslUp2, "SSL Up", linewidth=1, color=blue)
///////////////////////////////////////////////////
//Confirm Signals
///////////////////////////////////////////////////
c2_Up = sslUp2
c2_Down = sslDown2
//Signals based on crossover
c2_cross_Long = crossover(c2_Up, c2_Down)
c2_cross_Short = crossover(c2_Down, c2_Up)
//Signals based on signal position
c2_trend_Long = c2_Up > c2_Down ? 1 : 0
c2_trend_Short = c2_Down > c2_Up ? 1 : 0
confirm2_Long = c2_trend_Long
confirm2_Short = c2_trend_Short
plotshape(c2_cross_Long, color = green, style=shape.triangleup, location=location.bottom)
plotshape(c2_cross_Short, color = red, style=shape.triangledown, location=location.bottom)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// **** Volume Indicator Start ****
///////////////////////////////////////////////////
///////////////////////////////////////////////////
//TDFI
///////////////////////////////////////////////////
lookback = input(6, title = "TDFI Lookback")
filterHigh = input(0.05, title = "Filter High")
filterLow = input(-0.05, title = "Filter Low")
mma = ema(price * 1000, lookback)
smma = ema(mma, lookback)
impetmma = mma - mma[1]
impetsmma= smma - smma[1]
divma = abs(mma - smma)
averimpet = (impetmma + impetsmma) / 2
number = averimpet
pow = 3
result = na
for i = 1 to pow - 1
if i == 1
result := number
result := result * number
tdf = divma * result
ntdf = tdf / highest(abs(tdf), lookback * 3)
///////////////////////////////////////////////////
//Volume Signals
///////////////////////////////////////////////////
v_Long = ntdf > filterHigh ? 1 : 0
v_Short = filterLow > ntdf ? 1 : 0
volumeLong = v_Long
volumeShort = v_Short
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// **************************** Logic to handle NNFX rules ****************************
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Checking for confirmation indication with 1 candle difference for second confirmtion and volume
enterLong = confirm_Long and (confirm2_Long[0] or confirm2_Long[1]) and (volumeLong[0] or volumeLong[1]) ? 1 : 0
enterShort = confirm_Short and (confirm2_Short[0] or confirm2_Short[1]) and (volumeShort[0] or volumeShort[1]) ? 1 : 0
exitLong = c_cross_Short or c2_cross_Short ? 1 : 0
exitShort = c_cross_Long or c2_cross_Long ? 1 : 0
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Entries and Exits
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if (year>2009)
//Long entries with standard 1.5 ATR for SL, 1 ATR for TP
long_sl = price - (atr * slMultiplier)
long_tp = price + (atr * tpMultiplier)
//Short entries with standard 1.5 ATR for SL, 1 ATR for TP
short_sl = price + (atr * slMultiplier)
short_tp = price - (atr * tpMultiplier)
strategy.close("L1", when = exitLong)
strategy.close("S1", when = exitShort)
strategy.exit("L Limit Exit", "L1", stop = long_sl, limit = long_tp)
strategy.exit("S Limit Exit", "S1", stop = short_sl, limit = short_tp)
strategy.order("L1", strategy.long, when = enterLong)
strategy.order("S1", strategy.short, when = enterShort)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//End
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////