
এই কৌশলটি CCI সূচক, RSI সূচক এবং দুটি চলমান গড়ের সমন্বয়ে একটি সমন্বিত ট্রেডিং সিস্টেম। এই সিস্টেমটি নিয়মিত প্রবণতা ক্যাপচার করতে পারে এবং RSI সূচকটির ক্রসটি প্রবেশের সময় বাড়ানোর জন্য ব্যবহার করে, কিছু গোলমালকে ফিল্টার করার জন্য।
এই কৌশলটি মূলত সিসিআই সূচকের উপর ভিত্তি করে ট্রেন্ডের দিক নির্ধারণ করে। সিসিআই সূচকের মান 100 এর বেশি হলে এটি একটি মাল্টি হেড বাজার এবং 100 এর নীচে এটি একটি খালি হেড বাজার। সিস্টেমটি ট্রেন্ডের দিক নির্ধারণে সহায়তা করার জন্য দুটি মুভিং এভারেজ ক্রস ব্যবহার করে। এটি একটি ক্রয় সংকেত হিসাবে ব্যবহৃত হয় যখন এটি একটি ধীর গতির মুভিং এভারেজ অতিক্রম করে এবং বিপরীতভাবে এটি একটি বিক্রয় সংকেত।
পল্টু-হোলা ট্রেন্ড নির্ধারণের পরে, সিস্টেমটি প্রবেশের যাচাইকরণের জন্য দুটি প্যারামিটার দৈর্ঘ্যের বিভিন্ন আরএসআই সূচকগুলির ক্রস ব্যবহার করে। উদাহরণস্বরূপ, মাল্টি-হেড মার্কেটে, যদি একটি স্বল্প সময়ের আরএসআই সূচকটি দীর্ঘ সময়ের আরএসআই সূচকটি অতিক্রম করে তবে চূড়ান্ত ক্রয়ের সংকেত হিসাবে। এই নকশাটি মূলত শব্দটি ফিল্টার করার জন্য এবং প্রবণতাগুলির মধ্যে স্বল্পমেয়াদী সামঞ্জস্যের কারণে ভুল লেনদেন এড়াতে।
এই কৌশলটি কেবলমাত্র নির্ধারিত ট্রেডিংয়ের সময় পজিশন খোলার জন্য এবং বন্ধ হওয়ার 15 মিনিট আগে সমস্ত পজিশন সক্রিয়ভাবে প্যাড করে, রাতারাতি ঝুঁকি এড়াতে। পজিশন খোলার পরে মুনাফা লক করার জন্য মোবাইল স্টপ লস ব্যবহার করা হবে।
ট্রেডিং সিগন্যালের কার্যকারিতা নিশ্চিত করার জন্য, এই কৌশলটি ট্রেডিং সিগন্যালের কার্যকারিতা নিশ্চিত করার জন্য ট্রেডিং সিগন্যালের কার্যকারিতা নিশ্চিত করার জন্য প্রবণতা বিচার এবং সূচক ক্রস যাচাইকরণ বিবেচনা করে। প্যারামিটার অপ্টিমাইজেশন এবং লজিকাল সামঞ্জস্যের মাধ্যমে, এই কৌশলটি লাভের সুযোগকে আরও বাড়িয়ে তুলতে পারে এবং মিস করার সুযোগকে হ্রাস করতে পারে। এটি একটি খুব সম্ভাব্য ট্রেডিং ধারণা।
/*backtest
start: 2024-01-01 00:00:00
end: 2024-01-31 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © rwestbrookjr
//@version=5
strategy("EMA with RSI Cross Strategy", overlay=true)
//EMA
fastLen = input(title='Fast EMA Length', defval=9)
slowLen = input(title='Slow EMA Length', defval=20)
fastEMA = ta.ema(close, fastLen)
slowEMA = ta.ema(close, slowLen)
fema = plot(fastEMA, title='FastEMA', color=color.new(color.green, 0), linewidth=1, style=plot.style_line)
sema = plot(slowEMA, title='SlowEMA', color=color.new(color.red, 0), linewidth=1, style=plot.style_line)
fill(fema, sema, color=fastEMA > slowEMA ? color.new(#417505, 50) : color.new(#890101, 50), title='Cloud')
// Bull and Bear Alerts
//Bull = ta.crossover(fastEMA, slowEMA)
Bull = fastEMA > slowEMA
//Bear = ta.crossunder(fastEMA, slowEMA)
Bear = fastEMA < slowEMA
//RSIs
rsiLength1Input = input.int(9, minval=1, title="RSI Length", group="RSI Settings")
rsiSource1Input = input.source(close, "Source", group="RSI Settings")
rsiLength2Input = input.int(20, minval=1, title="RSI Length", group="RSI Settings")
rsiSource2Input = input.source(close, "Source", group="RSI Settings")
up1 = ta.rma(math.max(ta.change(rsiSource1Input), 0), rsiLength1Input)
down1 = ta.rma(-math.min(ta.change(rsiSource1Input), 0), rsiLength1Input)
rsi = down1 == 0 ? 100 : up1 == 0 ? 0 : 100 - (100 / (1 + up1 / down1))
up2 = ta.rma(math.max(ta.change(rsiSource2Input), 0), rsiLength2Input)
down2 = ta.rma(-math.min(ta.change(rsiSource2Input), 0), rsiLength2Input)
rsi2 = down2 == 0 ? 100 : up2 == 0 ? 0 : 100 - (100 / (1 + up2 / down2))
//CCI
cciLength = input.int(20, minval=1)
src = input(hlc3, title="Source")
ma = ta.sma(src, cciLength)
cci = (src - ma) / (0.015 * ta.dev(src, cciLength))
//Trail Stop Setup
trstp = input.float(title="Trail Loss($)", minval = 0.0, step = 0.01, defval = 0.5)
longStop = 0.0, shortStop = 0.0
longStop := if Bull
stopValue = close - trstp
math.max(stopValue, longStop[1])
else
0.0
shortStop := if Bear
stopValue = close + trstp
math.min(stopValue, shortStop[1])
else
999999
//Session Setup
open_session=input(defval="0930-1545")
session = time("1", open_session)
validSession=(na(session) ? 0 : 1)
//Trade Signals
longCondition = Bull and cci > 100 and ta.crossover(rsi,rsi2) and validSession
if (longCondition)
strategy.entry("Long", strategy.long, 1)
//longExit = close > strategy.opentrades.entry_price(0) + 1.5 or close < strategy.opentrades.entry_price(0) - 0.75
longExit = close < longStop or not validSession
if (longExit)
strategy.close("Long")
shortCondition = Bear and cci < 100 and ta.crossunder(rsi,rsi2) and validSession
if (shortCondition)
strategy.entry("Short", strategy.short, 1)
//shortExit = close < strategy.opentrades.entry_price(0) - 1.5 or close > strategy.opentrades.entry_price(0) + 0.75
shortExit = close > shortStop or not validSession
if (shortExit)
strategy.close("Short")