
এই কৌশলটি তরঙ্গ প্রবণতা সূচকগুলির উপর ভিত্তি করে ডিজাইন করা হয়েছে। তরঙ্গ প্রবণতা সূচকগুলি মূল্যের চ্যানেল এবং গড়ের সাথে মিলিত হয়, যা কার্যকরভাবে বাজার প্রবণতা সনাক্ত করতে পারে, ক্রয় এবং বিক্রয় সংকেত প্রেরণ করে। এই কৌশলটি তরঙ্গ প্রবণতার উপর ওভারপাইড ওভারপাইড লাইন স্থাপন করে, যখন সূচক লাইনটি সমালোচনামূলক লাইনটি ভেঙে দেয়, তখন ক্রয় বা বিক্রয় অপারেশন করে।
এই কৌশলটি তরঙ্গ প্রবণতা সূচকের উপর ভিত্তি করে, ওভারব্লু ওভারসোলের পরিস্থিতি সনাক্ত করার জন্য একটি কার্যকর প্রবণতা ট্র্যাকিং কৌশল। স্বল্পমেয়াদী সূচকের তুলনায়, তরঙ্গ প্রবণতা সূচকটি ভুল সংকেত হ্রাস করতে পারে এবং স্থিতিশীলতা বাড়িয়ে তুলতে পারে। পজিশন পরিচালনা এবং স্টপ লস সহ, কৌশলটি স্থিতিশীল আয় অর্জন করতে পারে। প্যারামিটার এবং মডেল অপ্টিমাইজেশনের মাধ্যমে কৌশলটির কার্যকারিতা আরও বাড়ানো যেতে পারে।
/*backtest
start: 2023-11-20 00:00:00
end: 2023-11-27 00:00:00
period: 1m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@author SoftKill21
//@version=4
strategy(title="WaveTrend strat", shorttitle="WaveTrend strategy")
n1 = input(10, "Channel Length")
n2 = input(21, "Average Length")
Overbought = input(70, "Over Bought")
Oversold = input(-30, "Over Sold ")
// BACKTESTING RANGE
// From Date Inputs
fromDay = input(defval = 1, title = "From Day", minval = 1, maxval = 31)
fromMonth = input(defval = 1, title = "From Month", minval = 1, maxval = 12)
fromYear = input(defval = 2001, title = "From Year", minval = 1970)
// To Date Inputs
toDay = input(defval = 1, title = "To Day", minval = 1, maxval = 31)
toMonth = input(defval = 12, title = "To Month", minval = 1, maxval = 12)
toYear = input(defval = 2020, title = "To Year", minval = 1970)
// Calculate start/end date and time condition
DST = 1 //day light saving for usa
//--- Europe
London = iff(DST==0,"0000-0900","0100-1000")
//--- America
NewYork = iff(DST==0,"0400-1500","0500-1600")
//--- Pacific
Sydney = iff(DST==0,"1300-2200","1400-2300")
//--- Asia
Tokyo = iff(DST==0,"1500-2400","1600-0100")
//-- Time In Range
timeinrange(res, sess) => time(res, sess) != 0
london = timeinrange(timeframe.period, London)
newyork = timeinrange(timeframe.period, NewYork)
startDate = timestamp(fromYear, fromMonth, fromDay, 00, 00)
finishDate = timestamp(toYear, toMonth, toDay, 00, 00)
time_cond = true //and (london or newyork)
ap = hlc3
esa = ema(ap, n1)
d = ema(abs(ap - esa), n1)
ci = (ap - esa) / (0.015 * d)
tci = ema(ci, n2)
wt1 = tci
wt2 = sma(wt1,4)
plot(0, color=color.gray)
plot(Overbought, color=color.red)
plot(Oversold, color=color.green)
plot(wt1, color=color.green)
longButton = input(title="Long", type=input.bool, defval=true)
shortButton = input(title="Short", type=input.bool, defval=true)
if(longButton==true)
strategy.entry("long",1,when=crossover(wt1,Oversold) and time_cond)
strategy.close("long",when=crossunder(wt1, Overbought))
if(shortButton==true)
strategy.entry("short",0,when=crossunder(wt1, Overbought) and time_cond)
strategy.close("short",when=crossover(wt1,Oversold))
//strategy.close_all(when= not (london or newyork),comment="time")
if(dayofweek == dayofweek.friday)
strategy.close_all(when= timeinrange(timeframe.period, "1300-1400"), comment="friday")