गति ब्रेकआउट ट्रेडिंग रणनीति मूल्य ब्रेकआउट और औसत रिवर्सन पर आधारित

लेखक:चाओझांग, दिनांक: 2023-11-13 16:50:45
टैगः

img

अवलोकन

यह रणनीति मूल्य ब्रेकआउट और औसत प्रतिगमन को संयोजित करती है ताकि रुझानों को निर्धारित और ट्रैक किया जा सके। यह पुष्टि और निस्पंदन के लिए कई संकेतकों का उपयोग करती है। यह रणनीति सख्त प्रवेश और निकास तंत्र के माध्यम से छोटे मुनाफे में लॉक करके अल्पकालिक और मध्यम अवधि के व्यापार के लिए उपयुक्त है।

रणनीति तर्क

  1. मूल्य प्रवृत्ति की दिशा निर्धारित करने के लिए HMA को आधार रेखा के रूप में उपयोग करें। HMA से ऊपर की कीमत ऊपर की प्रवृत्ति को इंगित करती है, HMA से नीचे की कीमत नीचे की प्रवृत्ति को इंगित करती है।

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

  3. TDFI को गति के संकेतक के रूप में बल को मापने के लिए प्रयोग किया जाता है। व्यापार में प्रवेश तभी किया जाता है जब गति एक निश्चित स्तर तक पहुंच जाती है।

  4. आरवीआई संकेतक बाहर निकलने के संकेतक के रूप में कार्य करता है। आरवीआई लाइन के आकार में परिवर्तन होने पर प्रवृत्ति थकावट।

  5. एटीआर स्टॉप लॉस और ले लाभ की गणना करता है।

  6. प्रवेश की शर्तेंः मूल्य आधार रेखा से टूट जाता है, एसएसएल चैनल की दिशा मूल्य के साथ संरेखित होती है, टीडीएफआई सीमा तक पहुंच जाता है।

  7. बाहर निकलने की शर्तेंः आरवीआई लाइन के आकार में परिवर्तन, मूल्य ब्रेकडाउन बेसलाइन और एसएसएल चैनल के माध्यम से।

लाभ विश्लेषण

  1. कई संकेतकों का संयोजन करने से झूठे ब्रेकआउट को प्रभावी ढंग से फ़िल्टर करने में मदद मिलती है।

  2. सख्त प्रवेश शर्तें और स्टॉप लॉस एक्जिट कंट्रोल सिंगल लॉस।

  3. अधिक लाभ प्राप्त करने के लिए कीमतों के रुझानों का पूरा लाभ उठाएं।

  4. संकेतकों के मापदंडों के लिए अनुकूलन के लिए बड़ा स्थान, विभिन्न उत्पादों और समय सीमाओं के लिए अनुकूलन योग्य।

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

  1. रुझान उलटने की पहचान करने में असमर्थता, ऊंचाइयों/नीचाइयों का पीछा करके ओवरट्रेडिंग के जोखिम।

  2. अल्पकालिक लेनदेन, अतिव्यापार के जोखिम।

  3. स्टॉप लॉस स्तर की सेटिंग में व्यक्तिपरक प्रभाव, बहुत ढीला या बहुत तंग हो सकता है।

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

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

  1. प्रवृत्ति की दिशा निर्धारित करने में सटीकता सुनिश्चित करने के लिए प्रवृत्ति निर्णय संकेतक जोड़ें।

  2. उच्च/निम्न स्तरों का पीछा करने की संभावना को कम करने के लिए रिवर्स सिग्नल संकेतकों को शामिल करें।

  3. अधिक गतिशील स्टॉप लॉस के लिए एटीआर को एटीआर ट्रैलिंग स्टॉप में डायनामिक समायोजन पर विचार करें।

  4. पैरामीटर अनुकूलन दिशाओं को खोजने के लिए विभिन्न एमए प्रणालियों का परीक्षण करें।

  5. विशिष्ट व्यापारिक उत्पादों के लिए मापदंडों का अनुकूलन करना।

निष्कर्ष

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


/*backtest
start: 2022-11-06 00:00:00
end: 2023-11-12 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=3
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Designed per No Nonsense Forex VP rules
//Made to be as modular as possible, so we can swap the indicators in and out.
//Originated from causecelebre
//Tried to put in as much VP rules as possible

///////////////////////////////////////////////////
//Rules Implemented:
///////////////////////////////////////////////////
// - SL 1.5 x ATR
// - TP 1 x ATR
//
// - Entry conditions
//// - Entry within 1 candles of baseline + 1 x confirmation + volume
//// - Entry only if baseline is < 1 x ATR
// - Exit conditions
//// - Exit on exit indicator or when baseline or confirmation flip 

///////////////////////////////////////////////////
//Trades entries
///////////////////////////////////////////////////
// - First entry L1 or S1 with standard SL and TP
// - Second entry L2 or S2 with standard SL and exit upon the exit conditions

///////////////////////////////////////////////////
//Included Indicators and settings
///////////////////////////////////////////////////
// - Baseline = HMA 20
// - Confirmtion = SSL 10
// - Volume = TDFI 4
// - Exit = RVI 4

///////////////////////////////////////////////////
//Credits
// Strategy causecelebre https://www.tradingview.com/u/causecelebre/
// TDFI causecelebre https://www.tradingview.com/u/causecelebre/
// SSL Channel ErwinBeckers https://www.tradingview.com/u/ErwinBeckers/
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

strategy(title="NNFX Strategy | jh", overlay = true )

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//  **** Set the main stuff  ****
///////////////////////////////////////////////////

//Price
price = close

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ATR stuff
///////////////////////////////////////////////////

atrLength = input(14, "ATR Length")
slMultiplier = input(1.5, "SL")
tpMultiplier = input(1, "TP")
atr = atr(atrLength)

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//  **** Baseline ****
///////////////////////////////////////////////////

///////////////////////////////////////////////////
//HMA 20
///////////////////////////////////////////////////

hmaslowlength = input(20, minval=1)
src = input(close, title="Source")
slowhullma = wma(2*wma(src, hmaslowlength/2)-wma(src, hmaslowlength), round(sqrt(hmaslowlength)))
plot(slowhullma, title = "baseline", color = yellow, linewidth=2, transp=0)

///////////////////////////////////////////////////
// Base Signals
///////////////////////////////////////////////////

///////////////////////////////////////////////////
baseline = slowhullma

//Signals based on crossover
//baseShort = crossover(baseLine, price)
//baseLong = crossover(price, baseLine)

//Signals based on signal position
b_Short = baseline > price ? 1 : 0
l_Long = baseline < price ? 1 : 0

baseShort = b_Short
baseLong = l_Long

///////////////////////////////////////////////////
//ATR Check
///////////////////////////////////////////////////

distBasefromPrice = abs(baseline - price)
atrCheck = distBasefromPrice <= atr ? 1 : 0

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//  **** Confirmation ****
///////////////////////////////////////////////////

///////////////////////////////////////////////////
//SSL Channel
///////////////////////////////////////////////////

sslLen=input(title="SSL Period", defval=10)
smaHigh=sma(high, sslLen)
smaLow=sma(low, sslLen)
Hlv = na
Hlv := close > smaHigh ? 1 : close < smaLow ? -1 : Hlv[1]
sslDown = Hlv < 0 ? smaHigh: smaLow
sslUp   = Hlv < 0 ? smaLow : smaHigh

///////////////////////////////////////////////////
//Confirm Signals
///////////////////////////////////////////////////

c_Up = sslUp
c_Down = sslDown

//Signals based on crossover
c_Long = crossover(c_Up, c_Down)
c_Short = crossover(c_Down, c_Up)

confirmLong = c_Long
confirmShort = c_Short

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//  **** Volume Indicator Start ****
///////////////////////////////////////////////////

///////////////////////////////////////////////////
//TDFI
///////////////////////////////////////////////////

lookback = input(4, title = "TDFI Lookback") 
filterHigh = input(0.05, title = "Filter High") 
filterLow = input(-0.05, title = "Filter Low") 

mma = ema(price * 1000, lookback)
smma = ema(mma, lookback)

impetmma = mma - mma[1]
impetsmma= smma - smma[1]
divma = abs(mma - smma)
averimpet = (impetmma + impetsmma) / 2

number = averimpet
pow = 3
result = na

for i = 1 to pow - 1
    if i == 1
        result := number
    result := result * number

tdf = divma * result
ntdf = tdf / highest(abs(tdf), lookback * 3)

///////////////////////////////////////////////////
//Volume Signals
///////////////////////////////////////////////////
v_Long = ntdf > filterHigh ? 1 : 0
v_Short = filterLow > ntdf ? 1 : 0

volumeLong = v_Long
volumeShort = v_Short

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// **** Exit Indicator ****
///////////////////////////////////////////////////

///////////////////////////////////////////////////
//RVI 4
///////////////////////////////////////////////////

rgvlen = input(4, title="RVI Length", minval=1)
rvi = sum(swma(close-open), rgvlen)/sum(swma(high-low),rgvlen)
sig = swma(rvi)

///////////////////////////////////////////////////
//Exit Signals
///////////////////////////////////////////////////
e_Short = crossover(rvi, sig)
e_Long = crossover(sig, rvi)

exitOutofShort = e_Short
exitOutofLong = e_Long

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// **************************** Logic to handle NNFX rules ****************************
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//Checking for base and confirmation indication with 1 candle difference
baseandConfirmLong = ((baseLong[0] and confirmLong[0]) or (baseLong[1] and confirmLong[0]) or (baseLong[1] and confirmLong[1]) or (baseLong[0] and confirmLong[1])) ? 1 : 0
baseandConfirmShort = ((baseShort[0] and confirmShort[0]) or (baseShort[1] and confirmShort[0]) or (baseShort[1] and confirmShort[1]) or (baseShort[0] and confirmShort[1])) ? 1 : 0

//Combining with volume with 1 candle difference
enterLong = ((baseandConfirmLong[0] and volumeLong[0]) or (baseandConfirmLong[1] and volumeLong[0]) or (baseandConfirmLong[1] and volumeLong[1]) or (baseandConfirmLong[0] and volumeLong[1])) ? 1 : 0
enterShort = ((baseandConfirmShort[0] and volumeShort[0]) or (baseandConfirmShort[1] and volumeShort[0]) or (baseandConfirmShort[1] and volumeShort[1]) or (baseandConfirmShort[0] and volumeShort[1])) ? 1 : 0

//Exit on base or confirmation flip over
baseandConfirmFliptoShort = ((baseShort[0] or confirmShort[0]) or (baseShort[1] or confirmShort[0]) or (baseShort[1] or confirmShort[1]) or (baseShort[0] or confirmShort[1])) ? 1 : 0
baseandConfirmFliptoLong = ((baseLong[0] or confirmLong[0]) or (baseLong[1] or confirmLong[0]) or (baseLong[1] or confirmLong[1]) or (baseLong[0] or confirmLong[1])) ? 1 : 0

//Exit on base and confirmation flip or exit indicator 
exitLong = exitOutofLong or baseandConfirmFliptoShort ? 1 : 0 
exitShort = exitOutofShort or baseandConfirmFliptoLong ? 1 : 0 

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Entries and Exits
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if (year>2009)

    //Long entries with standard 1.5 ATR for SL, 1 ATR for TP
    long_sl = price - atr * slMultiplier
    long_tp = price + atr * tpMultiplier
    strategy.entry("L1", strategy.long, when = enterLong and atrCheck)
    strategy.exit("L1 SL Exit", "L1", stop = long_sl, limit = long_tp)
    strategy.close("L1", when = exitLong)
    
    //Long entries with no TP
    strategy.entry("L2", strategy.long, when = enterLong and atrCheck)
    strategy.exit("L2 SL Exit", "L2", stop = long_sl)
    strategy.close("L2", when = exitLong)

    //Short entries with standard 1.5 ATR for SL, 1 ATR for TP
    short_sl = price + atr * slMultiplier
    short_tp = price - atr * tpMultiplier
    strategy.entry("S1", strategy.short, when = enterShort and atrCheck)
    strategy.exit("S1 SL Exit", "Short1", stop = short_sl, limit = short_tp)
    strategy.close("S1", when = exitShort)
    
    //Short entries with no TP
    strategy.entry("S2", strategy.short, when = enterShort and atrCheck)
    strategy.exit("S2 Exit", stop = short_sl)
    strategy.close("S2", when = exitShort)
    
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//End
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



    




अधिक