लेखक:चाओझांग
टैगः

img

अवलोकन

रणनीति तर्क

लाभ

  1. एसएमए और एटीआर चैनल के दोहरे फ़िल्टर अधिक विश्वसनीय व्यापार संकेत सुनिश्चित करते हैं, झूठे संकेतों को कम करते हैं।

  2. ऊपर और नीचे के रुझानों से लाभ प्राप्त करने के लिए दोनों लंबी और छोटी ट्रेडों को शामिल करता है।

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

  1. चैनल ब्रेकआउट ट्रेडों में यदि ब्रेकआउट गलत साबित होता है तो प्रमुख पलटाव बिंदुओं पर नुकसान होता है।

  2. खराब एटीआर पैरामीटर और गुणांक सेटिंग्स के परिणामस्वरूप अनुचित चैनल रेंज हो सकते हैं।

  3. बुल बाजार के उभरते रुझानों में लगातार लघु घाटे और मंदी के रुझानों में लगातार लंबी घाटे।

संभावित समाधान:

  1. झूठे ब्रेकआउट से नुकसान से बचने के लिए व्यापार आवृत्ति को समायोजित करें या फ़िल्टर जोड़ें।

बढ़ोतरी के अवसर

  1. एसएमए बेसलाइन से मूल्य विचलन होने पर तेजी से घाटे में कटौती करें।

सारांश


/*backtest
start: 2023-12-01 00:00:00
end: 2023-12-31 23:59:59
period: 30m
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © omererkan

//@version=5
strategy(title="ATR Channel Breakout")

smaLength = input.int(150, title="SMA Length")
atrLength = input.int(30, title="ATR Length")

ubOffset = input.float(4, title="Upperband Offset", step=0.50)
lbOffset = input.float(4, title="Lowerband Offset", step=0.50)


smaValue = ta.sma(close, smaLength)
atrValue = ta.atr(atrLength)

upperBand = smaValue + (ubOffset * atrValue)
lowerBand = smaValue - (lbOffset * atrValue)


plot(smaValue, title="SMA", color=color.orange)
plot(upperBand, title="UB", color=color.green, linewidth=2)
plot(lowerBand, title="LB", color=color.red, linewidth=2)


enterLong = ta.crossover(close, upperBand)
exitLong  = ta.crossunder(close, smaValue)


enterShort = ta.crossunder(close, lowerBand)
exitShort  = ta.crossover(close, smaValue)


if enterLong
    strategy.entry("Long", strategy.long)

if enterShort
    strategy.entry("Short", strategy.short)


if exitLong
    strategy.close("Long", "Close Long")

if exitShort
    strategy.close("Short", "Close Short")

अधिक