गोल्डन क्रॉस केल्टनर चैनल ट्रेंड रणनीति का पालन करना

लेखक:चाओझांग, दिनांक: 2023-11-02 14:31:10
टैगः

img

अवलोकन

गोल्डन क्रॉस केल्टनर चैनल ट्रेंड फॉलोइंग रणनीति एक रणनीति है जो केवल प्रवृत्ति की दिशा में व्यापार करती है। यह प्रवृत्ति की दिशा को पकड़ने के लिए प्रवेश संकेतों के रूप में चलती औसत गोल्डन क्रॉस और केल्टनर चैनल को जोड़ती है।

सिद्धांत

यह रणनीति दो चलती औसत का उपयोग करती है, एक अल्पकालिक और एक दीर्घकालिक चलती औसत, प्रवृत्ति की दिशा निर्धारित करने के लिए स्वर्ण क्रॉस और मृत्यु क्रॉस बनाने के लिए। उसी समय, यह केल्टनर चैनल के ऊपरी और निचले रेल को प्लॉट करने के लिए उपयोगकर्ता-परिभाषित गुणकों का उपयोग करता है और जब कीमतें चैनल से टूटती हैं तो ट्रेडिंग सिग्नल उत्पन्न करता है।

विशेष रूप से, रणनीति पहले जांचती है कि क्या दीर्घकालिक चलती औसत अल्पकालिक चलती औसत से ऊपर है, जो एक स्वर्ण क्रॉस और एक ऊपर की प्रवृत्ति को दर्शाता है। यदि अल्पकालिक एमए दीर्घकालिक एमए से नीचे है, तो यह एक मृत्यु क्रॉस है, जो एक नीचे की प्रवृत्ति को दर्शाता है।

ट्रेंड निर्धारण के आधार पर, यदि कीमत ऊपरी रेल से ऊपर टूट जाती है, तो एक लंबा संकेत उत्पन्न होता है। यदि कीमत निचली रेल से नीचे टूट जाती है, तो एक छोटा संकेत उत्पन्न होता है। उपयोगकर्ता रणनीति मापदंडों को अनुकूलित करने के लिए एमए अवधि और चैनल चौड़ाई को समायोजित कर सकते हैं।

प्रवेश के बाद, रणनीति लाभ लेने और स्टॉप-लॉस के लिए उपयोगकर्ता-परिभाषित एटीआर गुणकों का उपयोग करती है। यह अधिक लचीली स्थिति नियंत्रण के लिए अतिरिक्त ब्रेक-ईवन और स्टॉप-लॉस स्थितियों को भी प्रदान करती है।

लाभ विश्लेषण

इस रणनीति में प्रवृत्ति का अनुसरण करने और चैनल ब्रेकआउट के लाभों को जोड़कर प्रवृत्ति की प्रभावी पहचान और अवसरों को पकड़ने में सक्षम बनाया गया है। मुख्य लाभ हैंः

  1. स्वर्ण क्रॉस मुख्य रुझान के अनुरूप नहीं होने वाले झूठे संकेतों को फ़िल्टर करता है।

  2. प्रवृत्ति दिशा के साथ चैनल ब्रेकआउट प्रवेश सटीकता में सुधार करता है।

  3. लाभ और स्टॉप-लॉस लाभ और नियंत्रण जोखिमों को संरक्षित करते हैं।

  4. लचीले पैरामीटर समायोजन विभिन्न उत्पादों और वातावरणों के अनुकूल हैं।

  5. दोनों लंबे और छोटे जाते हैं, लागू करने की क्षमता का विस्तार।

जोखिम विश्लेषण

लाभों के बावजूद कुछ जोखिमों पर ध्यान देने की आवश्यकता हैः

  1. पलटने के अवसरों को खोना।

  2. रुझान में बदलाव से नुकसान हो सकता है।

  3. अनुचित मापदंडों के कारण अत्यधिक व्यापार या कम व्यापार हो सकता है।

  4. रातोंरात जोखिम मौजूद है।

  5. वक्र फिट जोखिम।

समाधानों में पैरामीटर अनुकूलन, समय पर एमए अवधि समायोजन और स्थिति आकार नियंत्रण शामिल हैं।

अनुकूलन दिशाएँ

इसमें और सुधार की संभावना हैः

  1. एक बहु-कारक मॉडल बनाने और सटीकता में सुधार के लिए अधिक संकेतक जोड़ना। उदाहरण के लिए एमएसीडी, आरएसआई।

  2. बाजार अनुकूलन क्षमता के लिए मशीन लर्निंग के माध्यम से पैरामीटर अनुकूलन।

  3. लाभप्रदता और इनाम को संतुलित करने के लिए गतिशील लाभ और स्टॉप-लॉस नियम।

  4. अस्थिरता के आधार पर गतिशील स्थिति आकार।

  5. विभिन्न उत्पादों के लिए इष्टतम मापदंडों का शोध करें।

  6. शुल्क को कम करने के लिए व्यापारिक आवृत्ति को कम करें।

निष्कर्ष

गोल्डन क्रॉस केल्टनर चैनल ट्रेंड फॉलोइंग रणनीति आम तौर पर एक स्थिर और विश्वसनीय ट्रेंड फॉलोइंग सिस्टम है। ट्रेंड फिल्टरिंग और चैनल ब्रेकआउट को जोड़कर, यह ट्रेंड दिशा के अनुरूप उच्च संभावना वाले अवसरों की पहचान करता है। आगे के अनुकूलन और सुधार इसे एक मजबूत ट्रेडिंग फ्रेमवर्क बना सकते हैं।


/*backtest
start: 2022-10-26 00:00:00
end: 2023-11-01 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/
// © OversoldPOS

//@version=5
// strategy("Keltner Channel Strategy by OversoldPOS", overlay=true,initial_capital = 100000,default_qty_type = strategy.percent_of_equity,default_qty_value = 10, commission_type = strategy.commission.cash_per_order, commission_value = 7)

// Parameters
length = input(21, title="MA Length")
Entrymult = input(1, title="Entry ATR")
profit_mult = input(4, title="Profit Taker")
exit_mult = input(-1, title="Exit ATR")

// Moving Average Type Input
ma_type = input.string("SMA", title="Moving Average Type", options=["SMA", "EMA", "WMA"])

// Calculate Keltner Channels for different ATR multiples
atr_value = ta.atr(length)

basis = switch ma_type
    "SMA" => ta.sma(close, length)
    "EMA" => ta.ema(close, length)
    "WMA" => ta.wma(close, length)
 

//
EntryKeltLong = basis + Entrymult * ta.atr(10)
EntryKeltShort = basis - Entrymult * ta.atr(10)
upper_channel1 = basis + 1 * ta.atr(10)
lower_channel1 = basis - 1 * ta.atr(10)
upper_channel2 = basis + 2 * ta.atr(10)
lower_channel2 = basis - 2 * ta.atr(10)
upper_channel3 = basis + 3 * ta.atr(10)
lower_channel3 = basis - 3 * ta.atr(10)
upper_channel4 = basis + 4 * ta.atr(10)
lower_channel4 = basis - 4 * ta.atr(10)

// Entry condition parameters
long_entry_condition = input(true, title="Long Positions")
short_entry_condition = input(true, title="Enable Short Positions")

// Additional conditions for long and short entries
is_long_entry = ta.ema(close, 20) > ta.ema(close, 50)
is_short_entry = ta.ema(close, 20) < ta.ema(close, 50)

// Additional conditions for long and short entries
MAShort =  input(50, title="Short MA for Golden Cross")
MALong =  input(200, title="Long MA for Golden Cross")
is_long_entry2 = ta.ema(close, MAShort) > ta.ema(close, MALong)
is_short_entry2 = ta.ema(close, MAShort) < ta.ema(close, MALong)

// Exit condition parameters
long_exit_condition1_enabled = input(true, title="Enable Long Profit Taker")
long_exit_condition2_enabled = input(true, title="Enable Long Stop")
short_exit_condition1_enabled = input(true, title="Enable Short Profit Taker")
short_exit_condition2_enabled = input(true, title="Enable Short Stop")

// Take Profit condition parameters
take_profit_enabled = input(true, title="Enable Take Profit Condition")

Takeprofit = basis + profit_mult * atr_value
STakeprofit = basis - profit_mult * atr_value

// Long entry condition
long_condition = long_entry_condition and ta.crossover(close, EntryKeltLong) and is_long_entry2

// Short entry condition
short_condition = short_entry_condition and ta.crossunder(close, EntryKeltShort) and is_short_entry2

// Exit conditions
long_exit_condition1 = long_exit_condition1_enabled and close > Takeprofit
long_exit_condition2 = long_exit_condition2_enabled and close < basis + exit_mult * atr_value
short_exit_condition1 = short_exit_condition1_enabled and close < STakeprofit
short_exit_condition2 = short_exit_condition2_enabled and close > basis - exit_mult * atr_value

// Strategy logic
if (long_condition)
    strategy.entry("Long", strategy.long)
if (short_condition)
    strategy.entry("Short", strategy.short)

if (long_exit_condition1 or long_exit_condition2)
    strategy.close("Long")

if (short_exit_condition1 or short_exit_condition2)
    strategy.close("Short")

// Moving Averages
var float MA1 = na
var float MA2 = na

if (ma_type == "SMA")
    MA1 := ta.sma(close, MAShort)
    MA2 := ta.sma(close, MALong)
else if (ma_type == "EMA")
    MA1 := ta.ema(close, MAShort)
    MA2 := ta.ema(close, MALong)
else if (ma_type == "WMA")
    MA1 := ta.wma(close, MAShort)
    MA2 := ta.wma(close, MALong)

// Plotting Keltner Channels with adjusted transparency
transparentColor = color.rgb(255, 255, 255, 56)

plot(upper_channel1, color=transparentColor, title="Upper Channel 1")
plot(lower_channel1, color=transparentColor, title="Lower Channel 1")
plot(upper_channel2, color=transparentColor, title="Upper Channel 2")
plot(lower_channel2, color=transparentColor, title="Lower Channel 2")
plot(upper_channel3, color=transparentColor, title="Upper Channel 3")
plot(lower_channel3, color=transparentColor, title="Lower Channel 3")
plot(upper_channel4, color=transparentColor, title="Upper Channel 4")
plot(lower_channel4, color=transparentColor, title="Lower Channel 4")
plot(basis, color=color.white, title="Basis")
plot(MA1, color=color.rgb(4, 248, 216), linewidth=2, title="Middle MA")
plot(MA2, color=color.rgb(220, 7, 248), linewidth=2, title="Long MA")


अधिक