ওভারলে ট্রেন্ড সিগন্যাল কৌশল

লেখক:চাওঝাং, তারিখঃ 2024-02-18 10:00:22
ট্যাগঃ

img

সারসংক্ষেপ

এই কৌশলটি ডিআই+ এবং ডিআই-এর পাশাপাশি গড় দিকনির্দেশক সূচক (এডিএক্স) এবং এক্সপোনেনশিয়াল মুভিং গড় (ইএমএ) গণনা করে ট্রেডিং সংকেত তৈরি করে। এটি একটি দীর্ঘ সংকেত সক্রিয় করে যখন ডিআই+ ডিআই+ এর উপরে ক্রস করে এবং এডিএক্স 20 এর উপরে থাকে। যখন ডিআই- ডিআই+ এর নীচে ক্রস করে এবং এডিএক্স 25 এর উপরে থাকে তখন একটি সংক্ষিপ্ত সংকেত সক্রিয় হয়। স্টপ লস সংকেত হয় যখন ডিআই- ডিআই+ এর উপরে ক্রস করে এবং এডিএক্স 30 এর উপরে থাকে।

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

  1. ডিআই+, ডিআই-, এডিএক্স গণনা করুন

    • DI+, DI-, ADX গণনা করতে ta.dmi() ব্যবহার করুন
    • ডিআই+/ডিআই- মূল্যের দিকনির্দেশনা পরিমাপ করে
    • এডিএক্স মূল্য আন্দোলনের শক্তি পরিমাপ করে
  2. এক্সপোনেন্সিয়াল মুভিং মিডিয়ার গণনা করুন

    • EMA গণনা করতে কাস্টম my_ema() ফাংশন ব্যবহার করুন
    • ইএমএ মূল্যের তথ্য সমতল করে
  3. ট্রেডিং সিগন্যাল তৈরি করুন

    • দীর্ঘ সংকেতঃ ডিআই + ডিআই- এবং এডিএক্স > 20 এর উপরে অতিক্রম করে এবং ইএমএ > কাছাকাছি
      • এই সূচকটি বাড়তি প্রবণতা এবং বাড়তি অস্থিরতা নির্দেশ করে
    • সংক্ষিপ্ত সংকেতঃ ডিআই + এবং এডিএক্স > 25 এর নীচে এবং ইএমএ < কাছাকাছি
      • নিম্নমুখী প্রবণতা এবং উচ্চ অস্থিরতা নির্দেশ করে
  4. স্টপ লস সেট করুন

    • দীর্ঘ স্টপ লসঃ ডিআই+ এবং এডিএক্স > 30 এর উপরে ডিআই- ক্রস
      • প্রবণতা বিপরীতমুখী নির্দেশ করে
    • সংক্ষিপ্ত স্টপ লসঃ ডিআই+ ডিআই- এবং এডিএক্স > ৩০ এর নিচে অতিক্রম করে
      • প্রবণতা বিপরীতমুখী নির্দেশ করে

সংক্ষেপে, এই কৌশলটি হ্রাস হ্রাসের জন্য স্টপ লস সহ শক্তিশালী দামের প্রবণতা প্রকাশের সময় ট্রেড করার জন্য গতি এবং প্রবণতা বিশ্লেষণের সূচকগুলিকে একত্রিত করে।

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

  1. ডুয়াল ডিআই ভুল সংকেত এড়ায়
    • একক ডিআই ভুল সংকেত দিতে পারে, ডাবল ডিআই প্রবণতা নিশ্চিত করে
  2. এডিএক্স প্রান্তিককরণের জন্য বাড়তি অস্থিরতা প্রয়োজন
    • শুধুমাত্র ট্রেড উচ্চ অস্থিরতা সরানো, পরিসীমা এড়ানো
  3. ইএমএ ডিআইকে পরিপূরক করে
    • EMA মধ্যম ও দীর্ঘমেয়াদী প্রবণতা চিহ্নিত করে
  4. স্ট্রিক্ট স্টপ লস
    • দ্রুত ক্ষতি হ্রাস করে

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

  1. ঘন ঘন স্টপ লস
    • অস্থিরতা ঘন ঘন থামতে পারে
  2. প্যারামিটার নির্ভরতা
    • সর্বোত্তম ডিআই এবং এডিএক্স পরামিতি খুঁজে বের করতে হবে
  3. কম ট্রেডিং ফ্রিকোয়েন্সি
    • কঠোর নিয়ম ব্যবসায়কে হ্রাস করে

স্টপ লস বাড়িয়ে, ট্যুইনিং প্যারামিটার, ফ্রিকোয়েন্সি বাড়ানোর জন্য ফিল্টার যোগ করে অপ্টিমাইজ করতে পারে।

অপ্টিমাইজেশান সুযোগ

  1. প্যারামিটার অপ্টিমাইজেশন
    • ডিআই এবং এডিএক্স প্যারামিটার অপ্টিমাইজ করুন
  2. ফিল্টার যোগ করুন
    • ভলিউম, বিচ্ছিন্নতা ইত্যাদি।
  3. স্টপ লস বাড়ান
    • ফ্রিকোয়েন্সি হ্রাস করার জন্য শিথিল স্টপ

সিদ্ধান্ত

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


/*backtest
start: 2024-01-01 00:00:00
end: 2024-01-31 23:59:59
period: 4h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Tamil_FNO_Trader

//@version=5
strategy("Overlay Signals by TFOT", overlay=true)

// Calculate DMI
len = input.int(14, minval=1, title="DI Length")
lensig = input.int(14, title="ADX Smoothing", minval=1, maxval=50)
[diplus, diminus, adx] = ta.dmi(len, lensig)

// Get EMA
emalen = input.int(26, minval=1, title = "EMA Length")
emasrc = input.source(close, title = "EMA Source")

my_ema(src, length) =>
    alpha = 2 / (length + 1)
    sum = 0.0
    sum := na(sum[1]) ? src : alpha * src + (1 - alpha) * nz(sum[1])
EMA2 = my_ema(emasrc, emalen)

// Variables
var bool buycondition1 = false
var bool sellcondition1 = false

var int firstbuybar = na
var int firstsellbar = na

var int buyexitbar = na
var int sellexitbar = na

var bool buyexit1 = false
var bool sellexit1 = false

// Buy & Sell Conditions
buycondition1 := (ta.crossover(diplus, diminus)) and (adx > 20) and (close > EMA2) and na(firstbuybar)
sellcondition1 := (ta.crossover(diminus, diplus)) and (adx > 25) and (close < EMA2) and na(firstsellbar)

buyexit1 := ta.crossover(diminus, diplus) and (adx > 30) and na(buyexitbar)
sellexit1 := ta.crossover(diplus, diminus) and (adx > 30) and na(sellexitbar)

if buycondition1
    if(na(firstbuybar))
        firstbuybar := bar_index
        buyexitbar := na
        firstsellbar := na
        strategy.entry("Buy", strategy.long)

if sellcondition1
    if(na(firstsellbar))
        firstsellbar := bar_index
        sellexitbar := na
        firstbuybar := na
        strategy.entry("Sell", strategy.short)

if buyexit1 and not na(firstbuybar)
    if(na(buyexitbar))
        buyexitbar := bar_index
        firstbuybar := na
        firstsellbar := na
        strategy.close("Buy")

if sellexit1 and not na(firstsellbar)
    if(na(sellexitbar))
        sellexitbar := bar_index
        firstsellbar := na
        firstbuybar := na
        strategy.close("Sell")

// Plot signals on chart
hl = input.bool(defval = true, title = "Signal Labels")

plotshape(hl and buycondition1 and bar_index == firstbuybar ? true : na, "Buy", style = shape.labelup, location = location.belowbar, color = color.green, text = "Buy", textcolor = color.white, size = size.tiny)
plotshape(hl and sellcondition1 and bar_index == firstsellbar ? true : na, "Sell", style = shape.labeldown, location = location.abovebar, color = color.red, text = "Sell", textcolor = color.white, size = size.tiny)

plotshape(hl and buyexit1 and bar_index == buyexitbar ? true : na, "Buy Exit", style = shape.labelup, location = location.belowbar, color = color.red, text = "Buy X", textcolor = color.white, size = size.tiny)
plotshape(hl and sellexit1 and bar_index == sellexitbar ? true : na, "Sell Exit", style = shape.labeldown, location = location.abovebar, color = color.red, text = "Sell X", textcolor = color.white, size = size.tiny)



আরো