अनुकूलित एमए और प्रवृत्ति रेखाओं पर आधारित प्रवृत्ति ब्रेकआउट रणनीति

लेखक:चाओझांग, दिनांक: 2023-09-19 15:49:37
टैगः

अवलोकन

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

रणनीति तर्क

  1. समग्र प्रवृत्ति निर्धारित करने के लिए 99-अवधि अनुकूलनशील एमए की गणना करता है।

  2. ऊपरी रुझान रेखा प्रतिरोध के लिए 14 अवधि के स्थानीय उच्च की गणना करता है।

  3. जब ट्रेंड लाइन के ऊपर बंद टूटता है और इस महीने कोई आदेश नहीं होता है तो लंबा हो जाता है।

  4. 14 अवधि के आरएसआई की गणना करता है और आरएसआई 70 से अधिक (ओवरबॉट) पर बाहर निकलता है।

  5. प्रति माह एक व्यापार सुनिश्चित करने के लिए अंतिम प्रविष्टि माह को ट्रैक करता है।

लाभ विश्लेषण

  1. अनुकूली एमए गतिशील रूप से रुझान परिवर्तनों को ट्रैक करता है।

  2. ट्रेंडलाइन ब्रेकआउट प्रवेश की सटीकता में सुधार करता है।

  3. आरएसआई प्रभावी रूप से जोखिम नियंत्रण के लिए ओवरबॉट/ओवरसोल्ड स्तरों का आकलन करता है।

  4. प्रति माह एक व्यापार से आवृत्ति और शुल्क कम हो जाता है।

  5. सरल और स्पष्ट तर्क, समझने और निष्पादित करने में आसान।

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

  1. अनुचित पैरामीटरों के कारण अनुपलब्ध प्रविष्टियां हो सकती हैं।

  2. फिक्स्ड एग्जिट इंडिकेटर समय पर बाजारों के अनुकूल नहीं हो सकते।

  3. कटौती की संभावना।

  4. लंबी अवधि के लिए जोखिम नियंत्रण नहीं।

  5. बहुत सारे फ़िल्टर प्रवेश को रोक सकते हैं।

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

  1. इष्टतम सेटिंग्स के लिए विभिन्न मापदंडों का परीक्षण करें।

  2. रणनीति की मजबूती में सुधार के लिए फ़िल्टर जोड़ें।

  3. गतिशील और पीछे हटने वाली स्टॉप रणनीतियों का विकास करना।

  4. मजबूत ब्रेकआउट की पहचान करने के लिए प्रवेश तर्क को अनुकूलित करें।

  5. उपयुक्त उपकरणों और समय सीमाओं का परीक्षण करें।

  6. झूठे ब्रेकआउट से बचने के लिए ट्रेंड फ़िल्टर जोड़ें.

सारांश

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


/*backtest
start: 2023-09-11 00:00:00
end: 2023-09-18 00:00:00
period: 15m
basePeriod: 5m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
strategy('Bannos Strategy', shorttitle='Bannos', overlay=true)

//The provided script is an indicator for TradingView written in Pine Script version 5. The indicator is used to determine entry and exit points for a trading strategy. Here's a detailed breakdown of what the script does:

// Strategy Definition:

// Bannos Strategy is the full name, with a short title Bannos.
// The overlay=true option indicates that the strategy will be overlayed on the price chart.
// Tracking Entry Month:

// A variable lastEntryMonth is set up to track the month of the last entry.
// currentMonth identifies the current month.
// Trend Regularity Adaptive Moving Average (TRAMA):

// It takes an input of length 99 as default.
// It uses adaptive calculations to track trend changes.
// Trendlines with Breaks:

// Identifies local peaks over a given period (in this case, 14) and calculates a slope based on these peaks.
// Relative Strength Index (RSI):

// Uses a length of 14 (default) to calculate the RSI.
// RSI is an oscillation indicator that indicates overbought or oversold conditions.
// Strategy Logic for Long Entry:

// A long position is opened if:
// The close price is above the TRAMA.
// There's a crossover of the close price and the upper trendline.
// The position is taken only once per month.
// Strategy Logic for Long Exit:

// The long position is closed if the RSI exceeds 70, indicating an overbought condition.
// Plotting:

// The TRAMA is plotted in red on the chart.
// A horizontal line is also drawn at 70 to indicate the RSI's overbought zone.
// In summary, this strategy aims to enter a long position when certain trend and crossover conditions are met, and close the position when the market is considered overbought as per the RSI. Additionally, it ensures entries only occur once a month.
//



// Variable pour suivre le mois de la dernière entrée
var float lastEntryMonth = na
currentMonth = month(time)

// Parameters for Trend Regularity Adaptive Moving Average (TRAMA)
length_trama = input(99)
src_trama = close
ama = 0.
hh = math.max(math.sign(ta.change(ta.highest(length_trama))), 0)
ll = math.max(math.sign(ta.change(ta.lowest(length_trama)) * -1), 0)
tc = math.pow(ta.sma(hh or ll ? 1 : 0, length_trama), 2)
ama := nz(ama[1] + tc * (src_trama - ama[1]), src_trama)

// Parameters for Trendlines with Breaks
length_trend = 14
mult = 1.0
ph = ta.pivothigh(length_trend, length_trend)
upper = 0.
slope_ph = 0.
slope_ph := ph ? mult : slope_ph
upper := ph ? ph : upper - slope_ph

// Parameters for RSI
rsiLength = 14
up = ta.rma(math.max(ta.change(close), 0), rsiLength)
down = ta.rma(-math.min(ta.change(close), 0), rsiLength)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))

// Strategy Logic for Long Entry
longCondition = close > ama and ta.crossover(close, upper) and (na(lastEntryMonth) or lastEntryMonth != currentMonth)
if (longCondition)
    lastEntryMonth := currentMonth
    strategy.entry('Long', strategy.long)

// Strategy Logic for Long Exit
exitCondition = rsi > 70
if (exitCondition)
    strategy.close('Long')

// Plotting
plot(ama, 'TRAMA', color=color.red)
hline(70, 'Overbought', color=color.red)


अधिक