ایک اے ٹی آر چینل بریک آؤٹ مقداری تجارتی حکمت عملی

مصنف:چاؤ ژانگ
ٹیگز:

img

جائزہ

حکمت عملی منطق

فوائد

  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")

مزید