প্রবণতা ট্র্যাকিং ইএমএ ব্রেকআউট কৌশল

লেখক:চাওঝাং, তারিখঃ 2024-01-12 14:23:11
ট্যাগঃ

img

সারসংক্ষেপ

এটি এক্সপোনেনশিয়াল মুভিং এভারেজ (ইএমএ) এর উপর ভিত্তি করে একটি ট্রেন্ড ট্র্যাকিং ব্রেকআউট কৌশল। এটি মাসিক, সাপ্তাহিক এবং দৈনিক সময় ফ্রেমগুলিতে প্রবণতার দিক বিচার করে এবং দৈনিক চার্টে নির্দিষ্ট প্রবেশ এবং প্রস্থান পদক্ষেপগুলি সম্পাদন করে।

কৌশলগত যুক্তি

প্রবণতা বিচার

  1. মাসিক চার্টে, দাম 8 দিনের EMA এর উপরে এবং 8 দিনের EMA 21 দিনের EMA এর উপরে, যা একটি আপট্রেন্ডের ইঙ্গিত দেয়;
  2. সাপ্তাহিক চার্টে, দাম 8 দিনের EMA এর উপরে এবং 8 দিনের EMA 21 দিনের EMA এর উপরে, যা একটি আপট্রেন্ডের ইঙ্গিত দেয়;
  3. দৈনিক চার্টে, দাম 8 দিনের EMA এর উপরে এবং 8 দিনের EMA 21 দিনের EMA এর উপরে, যা একটি আপট্রেন্ডের ইঙ্গিত দেয়;

প্রবেশ সংকেত

  1. দৈনিক চার্টে একটি পল্টব্যাক দেখা যাচ্ছে, যেখানে গতকালের ৮ দিনের ইএমএ-র নিচের পয়েন্ট স্পর্শ করা হয়েছে।
  2. পলব্যাক একটি রিং লো প্যাটার্ন গঠন করে যার মধ্যে নিম্ন উচ্চ এবং নিম্ন নিম্ন রয়েছে;
  3. বন্ধের মূল্য আগের দিনের সর্বোচ্চের তুলনায় বেশি, যা প্রবণতা বিপরীত হওয়ার সংকেত দেয়।

প্রস্থান সংকেত

মুনাফা নেওয়ার এবং বন্ধ হারের মান নির্ধারণ করুন।

সুবিধা বিশ্লেষণ

  1. তিনটি সময়সীমার উপর প্রবণতা বিচার সঠিকতা উন্নত করে;
  2. ইএমএ-তে পলব্যাক সমর্থন করে এবং প্রবেশের নিশ্চয়তা বাড়ায়;
  3. ট্রেন্ড রান ট্র্যাকিংয়ের উচ্চ মুনাফা সম্ভাবনা রয়েছে;

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

  1. সময়সীমার মধ্যে অসঙ্গতিপূর্ণ রায় মিথ্যা সংকেত সৃষ্টি করতে পারে;
  2. অত্যধিক প্রত্যাহারের মাত্রা কৌশলকে অবৈধ করে দিতে পারে;
  3. ফ্ল্যাশ ক্র্যাশের সময় স্টপ লস স্কেপ ঘটতে পারে।

অপ্টিমাইজেশান নির্দেশাবলী

  1. ম্যাকডি, আরএসআই যোগ করুন;
  2. ইএমএ প্যারামিটার সেটিংস অপ্টিমাইজ করুন;
  3. অস্থিরতার উপর ভিত্তি করে মুনাফা গ্রহণ এবং স্টপ লস পরিসীমা সামঞ্জস্য করুন।

সংক্ষিপ্তসার

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


/*backtest
start: 2023-01-11 00:00:00
end: 2024-01-11 00:00:00
period: 1d
basePeriod: 1h
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/
// © the_daily_trader

//@version=5
// ---------------------        Start of Code        ---------------------
strategy("Swing Trades Validator", overlay=true, margin_long=100, pyramiding = 0)

// Indicator Display Checks
TakeProfitPercent       = input.float(title="Profit Target %", defval=10, minval=1, step=0.05)
StopLossPercent         = input.float(title="Stop Loss %", defval=10, minval=1, step=0.05)
pullbackchoice          = input.bool(false, "Relaxed Entry Rules")

// EMAs
emaH            = ta.ema(close, 8)
emaHyest        = ta.ema(close[1], 8)
emaHyest1       = ta.ema(close[2], 8)
emaHyest2       = ta.ema(close[3], 8)
emaL            = ta.ema(close, 21)
emaLyest        = ta.ema(close[1], 21)
emaLyest1       = ta.ema(close[2], 21)
emaLyest2       = ta.ema(close[3], 21)
emaf            = ta.ema(close, 50)
emath           = ta.ema(close, 200)
emathhigh       = ta.ema(high, 200)
emathlow        = ta.ema(low, 200)
emaslowmonthly  = request.security(syminfo.tickerid, "M", emaL) // Monthly 21ema
emafastmonthly  = request.security(syminfo.tickerid, "M", emaH) // Monthly 8ema
emaslowweekly   = request.security(syminfo.tickerid, "W", emaL) // Weekly 21ema
emafastweekly   = request.security(syminfo.tickerid, "W", emaH) // Weekly 8ema
emaslowdaily    = request.security(syminfo.tickerid, "D", emaL) // Daily 21ema
emafastdaily    = request.security(syminfo.tickerid, "D", emaH) // Daily 8ema
emafdaily       = request.security(syminfo.tickerid, "D", emaf) // Daily 50ema
emathdaily      = request.security(syminfo.tickerid, "D", emath) // Daily ema
emathdailyhigh  = request.security(syminfo.tickerid, "D", emathhigh) // Daily ema High
emathdailylow   = request.security(syminfo.tickerid, "D", emathlow) // Daily ema Low
ema21yest       = request.security(syminfo.tickerid, "D", emaLyest) // Daily 21ema 1 day ago
ema21yest1      = request.security(syminfo.tickerid, "D", emaLyest1) // Daily 21ema 2 days ago
ema21yest2      = request.security(syminfo.tickerid, "D", emaLyest2) // Daily 21ema 3 days ago
ema8yest        = request.security(syminfo.tickerid, "D", emaHyest) // Daily 8ema 1 day ago
ema8yest1       = request.security(syminfo.tickerid, "D", emaHyest1) // Daily 8ema 2 days ago
ema8yest2       = request.security(syminfo.tickerid, "D", emaHyest2) // Daily 8ema 3 days ago


// Prices
monthopen       = request.security(syminfo.tickerid, 'M', open, barmerge.gaps_off, barmerge.lookahead_on)
monthclose      = request.security(syminfo.tickerid, 'M', close, barmerge.gaps_off, barmerge.lookahead_on)
weekopen        = request.security(syminfo.tickerid, 'W', open, barmerge.gaps_off, barmerge.lookahead_on)
weekclose       = request.security(syminfo.tickerid, 'W', close, barmerge.gaps_off, barmerge.lookahead_on)
dayopen         = request.security(syminfo.tickerid, 'D', open, barmerge.gaps_off, barmerge.lookahead_on)
dayclose        = request.security(syminfo.tickerid, 'D', close, barmerge.gaps_off, barmerge.lookahead_on)
threedayhigh    = request.security(syminfo.tickerid, 'D', high[3], barmerge.gaps_off, barmerge.lookahead_on)
twodayhigh      = request.security(syminfo.tickerid, 'D', high[2], barmerge.gaps_off, barmerge.lookahead_on)
yesthigh        = request.security(syminfo.tickerid, 'D', high[1], barmerge.gaps_off, barmerge.lookahead_on)
yestlow         = request.security(syminfo.tickerid, 'D', low[1], barmerge.gaps_off, barmerge.lookahead_on)

// Conditions 
monthlybullish          = emafastmonthly > emaslowmonthly
monthlybullishprice     = close > emafastmonthly
monthlybullishcandle    = monthclose > monthopen
weeklybullish           = emafastweekly > emaslowweekly
weeklybullishprice      = close > emafastweekly
weeklybullishcandle     = weekclose > weekopen
dailybullish1           = emafdaily > emathdaily
dailybullish2           = emafastdaily > emaslowdaily
dailybullishprice       = close > emafastdaily
dailybullishcandle      = dayclose > dayopen
ringlow                 = yestlow <= ema8yest
aggropullback           = twodayhigh < threedayhigh
pullback                = (pullbackchoice ? aggropullback : 0)
pullbackfailure         = dayclose > yesthigh and yesthigh < twodayhigh or pullback
emasetup                = ema8yest > ema21yest and ema8yest1 > ema21yest1 and ema8yest2 > ema21yest2

// Target Profit and Stop Loss Inputs
// Input parameters can be found at the beginning of the code
ProfitTarget        = (close * (TakeProfitPercent / 100)) / syminfo.mintick
StopLoss            = (close * (StopLossPercent / 100)) / syminfo.mintick

longCondition = monthlybullish and monthlybullishprice and weeklybullish and weeklybullishprice and dailybullish1 and dailybullish2 and dailybullishprice and monthlybullishcandle and weeklybullishcandle and dailybullishcandle and ringlow and pullbackfailure and emasetup

if (longCondition)
    strategy.entry("Long", strategy.long)
    strategy.exit ("Exit", "Long", profit = ProfitTarget, loss = StopLoss)
    // strategy.close("Long", qty_percent = 100)


// -----------xxxxxxxxxxx-------------    End of Code     -----------xxxxxxxxxxx---------------

আরো