টিএসআই সূচক সিসিআই সূচক হল মুভিং এভারেজ ট্রেডিং কৌশল


সৃষ্টির তারিখ: 2023-09-18 17:17:52 অবশেষে সংশোধন করুন: 2023-09-18 17:17:52
অনুলিপি: 3 ক্লিকের সংখ্যা: 484

ওভারভিউ

এই কৌশলটি টিএসআই সূচক, সিসিআই সূচক এবং হলের চলমান গড়ের সংমিশ্রণের মাধ্যমে প্রবণতা বিচার এবং বাণিজ্য করে। টিএসআই সূচক এবং সিসিআই সূচকগুলি মূল্য প্রবাহের প্রবণতা সনাক্ত করতে ব্যবহৃত হয় এবং হলের গড়টি প্রবণতার দিকনির্দেশনা নিশ্চিত করতে সহায়তা করে। অতিরিক্ত শূন্যতার সংকেত উপস্থিত হলে স্টপ পয়েন্ট সেট করুন এবং মুনাফা প্রত্যাহার করুন।

কৌশল নীতি

টিএসআই সূচকের কার্ভ এবং সিগন্যাল লাইন গণনা করুন, যখন সূচক লাইনটি সিগন্যাল লাইনটি অতিক্রম করে তখন একটি পলস সংকেত উত্পন্ন হয়, যখন এটি অতিক্রম করে তখন একটি ফাঁকা সংকেত। একই সাথে সিসিআই সূচক গণনা করুন, ওভারব্লড ওভারসেল অঞ্চলটি বিচার করুন। দামটি হোলের সমতল লাইনটি অতিক্রম করে এবং এটিকে ফাঁকা বাজার হিসাবে চিহ্নিত করে। টিএসআই, সিসিআই সূচকের শর্ত এবং হোলের সমতল লাইনটি পূরণ করার সময়, অতিরিক্ত বা ফাঁকা করার জন্য যথাযথ ব্যবস্থা গ্রহণ করুন। স্টপ মূল্য সেট করুন, স্টপ মূল্য পৌঁছানোর পরে পজিশন থেকে বেরিয়ে আসুন।

সামর্থ্য বিশ্লেষণ

  • টিএসআই সূচক প্রবণতা দিক নির্ধারণে শক্তিশালী
  • সিসিআই সূচক ওভারবয় ওভারসেলিংয়ের কার্যকর সনাক্তকরণ করে
  • হলের সমান্তরাল ফিল্টার ভুয়া ব্রেকিং, সংকেতের গুণমান উন্নত
  • স্টপ-অফ-প্রাইস সেট করুন, যখন লাভ সর্বাধিক হয় তখন বেরিয়ে আসুন
  • কৌশলগত স্থিতিশীলতা বাড়াতে একাধিক সূচককে একত্রিত করা

ঝুঁকি বিশ্লেষণ

  • আইএসআই, সিসিআই ইত্যাদি সূচকগুলি পিছিয়ে রয়েছে
  • হোলের গড় পরিমাপ সঠিক নয়
  • দাম কখন পাল্টে যাবে তা সঠিকভাবে বলতে পারছে না
  • ভুলভাবে স্টপ সেট করা মুনাফা হ্রাস করতে পারে

সূচক প্যারামিটারগুলিকে সামঞ্জস্য করে এবং স্টপ-অফ অ্যালগরিদমগুলিকে অপ্টিমাইজ করে ঝুঁকি হ্রাস করা যেতে পারে।

অপ্টিমাইজেশান দিক

  • টিএসআই, সিসিআই প্যারামিটার সমন্বয় পরীক্ষা করুন, কৌশল সংবেদনশীলতা বাড়ান
  • ডায়নামিক স্টপ, মোটিভ স্টপ ইত্যাদির অপ্টিমাইজেশন বিবেচনা করুন
  • অন্যান্য সূচকগুলির সাথে মিলিত হয়ে ট্রেন্ড রিভার্স পয়েন্ট নির্ধারণ করা
  • বিভিন্ন জাতের মধ্যে পরীক্ষা করে শক্তিবৃদ্ধি

সারসংক্ষেপ

এই কৌশলটি প্রবণতা নির্ধারণের জন্য একাধিক সূচককে সংহত করে, লাভের লকিংয়ের জন্য স্টপ-অফ কৌশল সেট করে এবং আরও ভাল পারফরম্যান্সের জন্য পুনরায় পরিমাপ করে। প্যারামিটার অপ্টিমাইজেশনের মাধ্যমে আরও উন্নত, এটি একটি স্থিতিশীল পরিমাণগত ট্রেডিং সিস্টেম হতে পারে।

কৌশল সোর্স কোড
/*backtest
start: 2023-08-18 00:00:00
end: 2023-09-17 00:00:00
period: 3h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4

strategy(title="TSI CCI Hull", shorttitle="TSICCIHULL", default_qty_type=strategy.percent_of_equity, default_qty_value=100, calc_on_order_fills= false, calc_on_every_tick=true, pyramiding=0, commission_type=strategy.commission.percent, commission_value=0.018)
long = input(title="Long Length", type=input.integer, defval=50)
short = input(title="Short Length", type=input.integer, defval=50)
signal = input(title="Signal Length", type=input.integer, defval=25)
price=input(title="Source",type=input.source,defval=close)
Period=input(26, minval=1)
lineupper = input(title="Upper Line", type=input.integer, defval=100)
linelower = input(title="Lower Line", type=input.integer, defval=-100)
p=price
length= Period
double_smooth(src, long, short) =>
    fist_smooth = ema(src, long)
    ema(fist_smooth, short)
pc = change(price)
double_smoothed_pc = double_smooth(pc, long, short)
double_smoothed_abs_pc = double_smooth(abs(pc), long, short)
tsi_value = 100 * (double_smoothed_pc / double_smoothed_abs_pc)
keh = tsi_value*5 > linelower ? color.red : color.lime
teh = ema(tsi_value*5, signal*5) > lineupper ? color.red : color.lime
meh = ema(tsi_value*5, signal*5) > tsi_value*5 ? color.red : color.lime
i1=plot(tsi_value*5, title="TSI Value", color=color.black, linewidth=1,transp=100)
i2=plot(ema(tsi_value*5, signal*5), title="TSI Signal", color=color.black, linewidth=1,transp=100)
fill(i1,i2,color=meh,transp=85)
plot(cross(tsi_value*5, ema(tsi_value*5, signal*5)) ? tsi_value*5 : na, style=plot.style_circles, color=color.black, linewidth=10)
plot(cross(tsi_value*5, ema(tsi_value*5, signal*5)) ? tsi_value*5 : na, style=plot.style_circles, color=color.white, linewidth=8,transp=0)
plot(cross(tsi_value*5, ema(tsi_value*5, signal*5)) ? tsi_value*5 : na, style=plot.style_circles, color=meh, linewidth=5)
n2ma = 2 * wma(p, round(length / 2))
nma = wma(p, length)
diff = n2ma - nma
sqn = round(sqrt(length))
n1 = wma(diff, sqn)
cci = (p - n1) / (0.015 * dev(p, length))
c = cci > 0 ? color.lime : color.red
c1 = cci > 20 ? color.lime : color.silver
c2 = cci < -20 ? color.red : color.silver
cc=plot(cci, color=c, title="CCI Line", linewidth=2)
cc2=plot(cci[1], color=color.gray, linewidth=1,transp=100)
fill(cc,cc2,color=c,transp=85)
plot(cross(20, cci) ? 20 : na, style=plot.style_cross,title="CCI cross UP",  color=c1, linewidth=2,transp=100,offset=-2)
plot(cross(-20, cci) ? -20 : na, style=plot.style_cross,title="CCI cross down",  color=c2, linewidth=2,transp=100,offset=-2)

TSI1=ema(tsi_value*5, signal*5)
TSI2=ema(tsi_value*5, signal*5)[2]

hullma_smoothed = wma(2*wma(n1, Period/2)-wma(n1, Period), round(sqrt(Period)))
//plot(hullma_smoothed*200)

// Make input options that configure backtest date range
startDate = input(title="Start Date", type=input.integer,
     defval=1, minval=1, maxval=31)
startMonth = input(title="Start Month", type=input.integer,
     defval=1, minval=1, maxval=12)
startYear = input(title="Start Year", type=input.integer,
     defval=2018, minval=1800, maxval=2100)

endDate = input(title="End Date", type=input.integer,
     defval=1, minval=1, maxval=31)
endMonth = input(title="End Month", type=input.integer,
     defval=7, minval=1, maxval=12)
endYear = input(title="End Year", type=input.integer,
     defval=9999, minval=1800, maxval=2100)
     
// Look if the close time of the current bar
// falls inside the date range
inDateRange = (time >= timestamp(syminfo.timezone, startYear,
         startMonth, startDate, 0, 0)) and
     (time < timestamp(syminfo.timezone, endYear, endMonth, endDate, 0, 0))
     
LongProfitPercent=input(0.5)
ShortProfitPercent=input(0.5)
LP=(LongProfitPercent/100)+1
SP=(ShortProfitPercent/100)+1

LongProfitSource=input(title="profit long source",type=input.source,defval=close)
ShortProfitSource=input(title="profit short source",type=input.source,defval=close)

longCondition = TSI1>TSI2 and hullma_smoothed<price and cci>0
shortCondition = TSI1<TSI2 and hullma_smoothed>price and cci<0

if (longCondition and cci>cci[1] and cci > 0 and n1>n1[1] and inDateRange)
    strategy.entry("buy", strategy.long)
strategy.close("buy", when = shortCondition and cci<cci[1] and cci < 0 and n1<n1[1] or LongProfitSource>strategy.position_avg_price*LP and inDateRange)
if (shortCondition and cci<cci[1] and cci < 0 and n1<n1[1] and inDateRange)
    strategy.entry("sell", strategy.short)
strategy.close("sell", when = longCondition and cci>cci[1] and cci > 0 and n1>n1[1] or ShortProfitSource<strategy.position_avg_price/SP and inDateRange)