মাল্টি-স্কেল Tangqi ধাপে ধাপে চ্যানেলের উপর ভিত্তি করে ট্রেডিং কৌশল


সৃষ্টির তারিখ: 2024-02-27 14:57:37 অবশেষে সংশোধন করুন: 2024-02-27 14:57:37
অনুলিপি: 0 ক্লিকের সংখ্যা: 657
1
ফোকাস
1617
অনুসারী

মাল্টি-স্কেল Tangqi ধাপে ধাপে চ্যানেলের উপর ভিত্তি করে ট্রেডিং কৌশল

ওভারভিউ

এটি একটি ট্রেডিং কৌশল যা একাধিক সময় স্কেলে টানচি চ্যানেল ব্যবহার করে প্রবেশ এবং প্রস্থান পয়েন্টগুলি বিচার করে। কৌশলটির মূল ধারণাটি হ’লঃ দীর্ঘ সময় স্কেলে প্রবণতা দিকটি বিচার করুন এবং প্রবেশের সময়টি সন্ধান করুন; সংক্ষিপ্ত সময় স্কেলে প্রবণতা বিপরীততা বিচার করুন এবং প্রস্থান সময়টি সন্ধান করুন।

কৌশল নীতি

এই কৌশলটি মূলত টনচ চ্যানেলের ধারণাকে ব্যবহার করে। টনচ চ্যানেলটি উপরের, নীচের এবং মধ্যম লাইন দ্বারা গঠিত। চ্যানেলের প্রস্থ সময়ের সাথে পরিবর্তিত হয়। আমরা এখানে বিভিন্ন সময় স্কেল ব্যবহার করে টনচ চ্যানেলটি তৈরি করেছি, যথাঃ

  1. ৫২টি চক্র ব্যবহার করে একটি দীর্ঘ সময় স্কেলের টংচ চ্যানেল তৈরি করা হয়েছে, যা চ্যানেলের উপরের, নীচের এবং মধ্যম লাইনগুলি প্রদান করে
  2. ১২টি চক্র ব্যবহার করে একটি সংক্ষিপ্ত সময় স্কেলের টাংচ চ্যানেল তৈরি করা হয়েছে, যা চ্যানেলের উপরের, নীচের এবং মধ্যম লাইনগুলি প্রদান করে

এন্ট্রি লজিকঃ যখন দাম একটি দীর্ঘ সময়ের স্কেল চ্যানেলের উপরের প্রান্তটি ভেঙে দেয়, তখন এটি একটি মাল্টিহেড এন্ট্রি হিসাবে বিবেচিত হয়। মিথ্যা বিরতি এড়াতে, আমরা সর্বশেষ 3 টি কে লাইনের মধ্যে কমপক্ষে 1 টি কে লাইনের ক্লোজ-আপের দাম কে লাইনের উপরের প্রান্তের চেয়ে বেশি প্রয়োজন, যাতে স্বল্পমেয়াদী অত্যধিক সম্প্রসারণের ফলে মিথ্যা বিরতি এড়ানো যায়।

প্রস্থান লজিকঃ যখন দাম একটি সংক্ষিপ্ত সময় স্কেলের চ্যানেলের নীচে পড়ে, তখন এটি খালি হওয়ার সময় বলে বিবেচিত হয়। আমরা একইভাবে দাবি করি যে সর্বশেষ 3 টি K লাইনের মধ্যে কমপক্ষে 1 টি K লাইন বন্ধের দাম এই K লাইনের চ্যানেলের নীচে রয়েছে, যাতে এটি নিশ্চিত করা যায় যে বিরতিটি কার্যকর ছিল, যাতে এটি বন্ধ না হয়।

কৌশলগত সুবিধা

  1. এই কৌশলটি প্রবণতা অনুসরণ এবং বিপরীত ট্রেডিংয়ের সুবিধাগুলিকে একত্রিত করে। দীর্ঘ সময়ের স্কেল প্রবণতার দিকনির্দেশনা এবং সংক্ষিপ্ত সময়ের স্কেল স্থানীয় বিপরীতের বিচার করে, উভয়ই প্রবণতার মধ্যে স্থানীয় ওঠানামা ক্যাপচার করতে পারে।

  2. মাল্টি-টাইম স্কেল অ্যানালিসিস ব্যবহার করে, ভুয়া ব্রেকিংয়ের সমস্যাগুলি আরও ভালভাবে মোকাবেলা করা যায়, যা প্রবেশ এবং প্রস্থানকে আরও স্পষ্ট এবং কার্যকর করে তোলে।

  3. প্যারামিটার অপ্টিমাইজেশনের মাধ্যমে, বিভিন্ন জাত এবং বাজারের পরিবেশের সাথে খাপ খাইয়ে নিতে পারে।

ঝুঁকি ও সমাধান

  1. এই কৌশলটি প্যারামিটার-সংবেদনশীল, এবং বিভিন্ন প্যারামিটারগুলি সম্পূর্ণ ভিন্ন ফলাফল দিতে পারে। সর্বোত্তম প্যারামিটার সমন্বয় খুঁজে বের করার জন্য পর্যাপ্ত পরীক্ষা এবং অপ্টিমাইজেশন প্রয়োজন।

  2. এই কৌশলটি অস্থিরতার সময় প্রচুর ট্রেডিং সিগন্যাল তৈরি করতে পারে, যার ফলে অতিরিক্ত ট্রেডিং হয়। স্টপ লস কনফিগারেশন দ্বারা একক ক্ষতি নিয়ন্ত্রণ করা যেতে পারে।

  3. কৌশলটি বড় স্তরের প্রবণতা নির্ধারণের লজিককে বিবেচনা করে না, এবং এটি বিয়ার-বোরের রূপান্তর পয়েন্টে ব্যর্থ হতে পারে। বড় স্তরের প্রবণতা নির্ধারণের জন্য অন্যান্য সূচকগুলির সাথে মিলিত হতে পারে।

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

  1. প্যারামিটার অপ্টিমাইজেশান করুন, সর্বোত্তম প্যারামিটার সমন্বয় খুঁজুন। অপ্টিমাইজেশন চক্রের দৈর্ঘ্য, চ্যানেলের ধরন ইত্যাদি প্যারামিটারগুলি।

  2. স্টপ লজিক যুক্ত করা হয়েছে। যুক্তিসঙ্গত মোবাইল স্টপ কনফিগার করা হয়েছে, একক ক্ষতি নিয়ন্ত্রণ করা হয়েছে।

  3. অন্যান্য সূচকগুলির সাথে মিলিত হয়ে বড় আকারের প্রবণতা নির্ধারণ করুন। যেমন ইএমএ, কে-লাইন চ্যানেল, ম্যাক সূচক ইত্যাদি।

সারসংক্ষেপ

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

কৌশল সোর্স কোড
/*backtest
start: 2023-02-20 00:00:00
end: 2024-02-26 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/
// © venkyrocker7777

//@version=5

strategy('Donchain channel based investment strategy', shorttitle='Donchain channel strategy', overlay=true)

Length = input.int(21, minval=1)
xPrice = close
xvnoise = math.abs(xPrice - xPrice[1])
nAMA = 0.0
nfastend = 0.666
nslowend = 0.0645
nsignal = math.abs(xPrice - xPrice[Length])
nnoise = math.sum(xvnoise, Length)
nefratio = nnoise != 0 ? nsignal / nnoise : 0
nsmooth = math.pow(nefratio * (nfastend - nslowend) + nslowend, 2)
nAMA := nz(nAMA[1]) + nsmooth * (xPrice - nz(nAMA[1]))
plot(nAMA, color=color.new(color.blue, 0), title='KAMA')

// Function to get Lower Channel, Upper Channel, Middle Channel for a period length
getLCUCMC(PeriodLength) =>
    lowestValueInThePeriod = ta.lowest(PeriodLength)  // LC
    highestValueInThePeriod = ta.highest(PeriodLength)  // UC
    middleChannelInTheperiod = math.avg(highestValueInThePeriod, lowestValueInThePeriod)  // MC
    // Returns Lower Channel, Upper Channel, Middle Channel for a period length
    [lowestValueInThePeriod, highestValueInThePeriod, middleChannelInTheperiod]

// Longer time frame for entry
longerPeriod = 52

// Shorter time frame for exit
shorterPeriod = 12

if timeframe.period == 'D'
    // Longer time frame for entry
    longerPeriod := 52 * 5

    // Shorter time frame for exit
    shorterPeriod := 12 * 5
    shorterPeriod

if timeframe.period == 'M'
    // Longer time frame for entry
    longerPeriod := 12

    // Shorter time frame for exit
    shorterPeriod := 3
    shorterPeriod

// Get Lower Channel, Upper Channel, Middle Channel for longerPeriod, shorterPeriod
[lowestValueInTheLongerPeriodLength, highestValueInTheLongerPeriodLength, middleChannelInLongerperiod] = getLCUCMC(longerPeriod)
[lowestValueInTheShorterPeriodLength, highestValueInTheShorterPeriodLength, middleChannelInShorterperiod] = getLCUCMC(shorterPeriod)


// Plot Upper Channel of longerPeriod in dark green
plot(highestValueInTheLongerPeriodLength, 'highestValueInTheLongerPeriodLength', color=color.new(color.green, 0))

// Plot Lower Channel of shorterPeriod in dark red
plot(lowestValueInTheShorterPeriodLength, 'lowestValueInTheShorterPeriodLength', color=color.new(color.red, 0))

// Entry Plan
// Will start to see if we can enter when high crosses up longer period high (high >= highestValueInTheLongerPeriodLength)
// Check if any of the three past candles and enter when any of the 3 past candles satisfy
// 1) high of that candle >= highestValueInTheLongerPeriodLength of that candle (high[i] >= highestValueInTheLongerPeriodLength[i])
// 2) close of entry point consideration candle is above close of that candle (close > close[i])
isThisPointAnEntry() =>
// Check last 3 bars
    isThisPointAnEntry = false
    offset = 0
    for i = 1 to 3 by 1
        isCurrentCandleALongerPeriodHigh = high >= highestValueInTheLongerPeriodLength
        isCurrentCandleCloseGreaterThanPreiousIthOne = close > close[i]
        isPreviousIthCandleAlsoALongerPeriodHigh = high[i] >= highestValueInTheLongerPeriodLength[i]
        isThisPointAnEntry := isCurrentCandleALongerPeriodHigh and isCurrentCandleCloseGreaterThanPreiousIthOne and isPreviousIthCandleAlsoALongerPeriodHigh
        if isThisPointAnEntry
            offset := -i
            break
    [isThisPointAnEntry, offset]

// Exit Plan - same as entry plan, with things reversed and also on a shorter time frame
// Will start to see if we should exit when low crosses down longer period low (low <= lowestValueInTheShorterPeriodLength)
// Check if any of the three past candles and exit when any of the 3 past candles satisfy
// 1) low of that candle <= highestValueInTheLongerPeriodLength of that candle (low[i] <= lowestValueInTheShorterPeriodLength[i])
// 2) close of exit point consideration candle is below close of that candle (close < close[i])
isThisPointAnExit() =>
// Check last 3 bars
    isThisPointAnExit = false
    for i = 1 to 3 by 1
        isCurrentCandleAShorterPeriodLow = low <= lowestValueInTheShorterPeriodLength
        isCurrentCandleCloseLesserThanPreiousIthOne = close < close[i]
        isPreviousIthCandleAlsoAShorterPeriodLow = low[i] <= lowestValueInTheShorterPeriodLength[i]
        isThisPointAnExit := isCurrentCandleAShorterPeriodLow and isCurrentCandleCloseLesserThanPreiousIthOne and isPreviousIthCandleAlsoAShorterPeriodLow
        break
    isThisPointAnExit

[isEntry, offset] = isThisPointAnEntry()


if isEntry
    strategy.entry('Buy', strategy.long)

strategy.close_all(when=isThisPointAnExit() == true)

if year(timenow) == year(time) and month(timenow) == month(time) and dayofmonth(timenow) - 2 == dayofmonth(time)
    strategy.close_all()