दिशात्मक प्रवृत्ति सूचकांक ट्रेडिंग रणनीति


निर्माण तिथि: 2023-09-18 17:07:55 अंत में संशोधित करें: 2023-09-18 17:07:55
कॉपी: 1 क्लिक्स: 759
1
ध्यान केंद्रित करना
1617
समर्थक

अवलोकन

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

रणनीति सिद्धांत

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

श्रेष्ठता विश्लेषण

  • डीटीआई ट्रेंड की दिशा में सटीक है, कम संकेत
  • थ्रेड फ़िल्टरिंग के साथ ब्रेकडाउन को निष्क्रिय करना, शोर लेनदेन से बचना
  • ट्रेंड को ट्रैक करना, अल्पकालिक उतार-चढ़ाव से मुक्त होना
  • प्रतिक्रिया संवेदनशीलता को संतुलित करने के लिए पैरामीटर समायोजन के लिए बड़ा स्थान

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

  • ट्रेंड रिवर्स प्वाइंट का सटीक आकलन करने में असमर्थता, घाटे का जोखिम
  • गलत डीटीआई पैरामीटर सेट करने से ट्रेडिंग के अवसरों की कमी हो सकती है
  • लंबे समय तक स्थिति रखने से बड़ी निकासी हो सकती है
  • उच्च आवृत्ति वाले ट्रेडिंग के लिए उपयुक्त नहीं

उचित रूप से गणना चक्र को छोटा करें, थ्रेशोल्ड पैरामीटर को समायोजित करें, या अन्य संकेतकों के साथ मिलकर ट्रेंड रिवर्स का आकलन करें।

अनुकूलन दिशा

  • परीक्षण DTI के विभिन्न पैरामीटर संयोजनों की गणना करता है
  • डीटीआई के लिए अनुकूलित अधिक रिक्तियों का थ्रेशोल्ड
  • जोखिम नियंत्रण के लिए स्टॉप लॉस रणनीति पर विचार करें
  • विभिन्न किस्मों में परीक्षण पैरामीटर मजबूतता

संक्षेप

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

रणनीति स्रोत कोड
/*backtest
start: 2023-08-18 00:00:00
end: 2023-09-17 00:00:00
period: 4h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=2
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 29/03/2017
// This technique was described by William Blau in his book "Momentum,
// Direction and Divergence" (1995). His book focuses on three key aspects 
// of trading: momentum, direction and divergence. Blau, who was an electrical 
// engineer before becoming a trader, thoroughly examines the relationship between 
// price and momentum in step-by-step examples. From this grounding, he then looks 
// at the deficiencies in other oscillators and introduces some innovative techniques, 
// including a fresh twist on Stochastics. On directional issues, he analyzes the 
// intricacies of ADX and offers a unique approach to help define trending and 
// non-trending periods.
// Directional Trend Index is an indicator similar to DM+ developed by Welles Wilder. 
// The DM+ (a part of Directional Movement System which includes both DM+ and 
// DM- indicators) indicator helps determine if a security is "trending." William 
// Blau added to it a zeroline, relative to which the indicator is deemed positive or 
// negative. A stable uptrend is a period when the DTI value is positive and rising, a 
// downtrend when it is negative and falling. 
//
// You can change long to short in the Input Settings
// Please, use it only for learning or paper trading. Do not for real trading.
////////////////////////////////////////////////////////////
strategy(title="Directional Trend Index (DTI)", shorttitle="DTI")
r = input(14, minval=1)
s = input(10, minval=1)
u = input(5, minval=1)
OS = input(45, minval=1)
OB = input(-45, maxval=-1)
reverse = input(false, title="Trade reverse")
hline(0, color=green, linestyle=line)
xHMU = iff(high - high[1] > 0, high - high[1], 0)
xLMD = iff(low - low[1] < 0, -(low - low[1]), 0)
xPrice = xHMU - xLMD
xPriceAbs = abs(xPrice)
xuXA = ema(ema(ema(xPrice, r),s),u)
xuXAAbs = ema(ema(ema(xPriceAbs, r),s),u)
Val1 = 100 * xuXA
Val2 = xuXAAbs
DTI = iff(Val2 != 0, Val1 / Val2, 0)
pos = iff(DTI > OS, -1,
	     iff(DTI < OB, 1, nz(pos[1], 0))) 
possig = iff(reverse and pos == 1, -1,
          iff(reverse and pos == -1, 1, pos))	   
if (possig == 1) 
    strategy.entry("Long", strategy.long)
if (possig == -1)
    strategy.entry("Short", strategy.short)	   	    
barcolor(possig == -1 ? red: possig == 1 ? green : blue )
plot(DTI, color=maroon, title="DTI")
plot(OB, color=blue, title="OB")
plot(OS, color=red, title="OS")