اپ ٹرینڈ اور اوور سیلڈ انڈیکس سوئنگ ٹریڈنگ سسٹم کی حکمت عملی

مصنف:چاؤ ژانگ، تاریخ: 2023-09-11 11:35:33
ٹیگز:

I11L ہائپر ٹرینڈ کے ساتھ سواری کے رجحانات اور اوسط الٹ

آئی 11 ایل ہائپر ٹرینڈ حکمت عملی خریدنے کے لئے اوور سیلڈ سطحوں اور تجارت کے لئے اپ ٹرینڈز کی نشاندہی کرنے کے لئے متعدد ٹائم فریموں میں رفتار اسکورنگ سسٹم کا استعمال کرتی ہے۔ اس کا مقصد قلیل مدتی انسداد رجحان کے اچھال اور رفتار کے وقفے سے فائدہ اٹھانا ہے۔

حکمت عملی کیسے کام کرتی ہے

اہم اجزاء میں شامل ہیں:

  • 20 ادوار کے دوران EMAs/SMAs کا موازنہ کرنے والا سکورنگ سسٹم
  • اعلی اسکور اپ ٹرینڈ کی نشاندہی کرتا ہے، کم اسکور oversold حالات
  • انٹری/آؤٹ سگنل کے طور پر استعمال ہونے والے اسکورز کا کراس اوور
  • کھلے منافع کی حفاظت کے لئے ٹریلنگ سٹاپ نقصان
  • داخلہ قیمت پر مبنی منافع حاصل کرنے کا مقررہ ہدف

جب سکور کراس اوور ہوتے ہیں تو زیادہ فروخت ہونے والی تبدیلیوں پر لانگ درج کیے جاتے ہیں۔ جب سکور کراس اوور ہوتے ہیں تو شارٹس لیتے ہیں۔

ٹریلنگ اسٹاپ منافع میں تالا لگاتا ہے جبکہ منافع لینے والے ایک مقررہ خطرہ / انعام کے ضرب پر باہر نکلتے ہیں.

آئی 11 ایل سسٹم کے فوائد

اس نقطہ نظر کے اہم فوائد:

  • مجموعہ کا مطلب ہے واپسی اور رجحان کے بعد
  • اسکورنگ مارکیٹ کے بدلتے حالات کے مطابق ہے
  • متعدد ٹائم فریم ٹرننگ پوائنٹس کی نشاندہی کرتے ہیں
  • ٹریلنگ اسٹاپ تجارت کے انتظام کو خودکار کرتا ہے
  • کمپاؤنڈنگ مضبوط رجحانات میں واپسی میں اضافہ کرتی ہے

متحرک سکورنگ سسٹم واپسی اور بریک آؤٹ دونوں کے لئے تجارت کے لئے قیمتی بصیرت فراہم کرتا ہے۔

ممکنہ کمزوریاں اور خطرات

تاہم، کچھ حدود موجود ہیں:

  • ماضی کے اعداد و شمار پر زیادہ سے زیادہ اصلاح کا امکان
  • تاخیر والے سکور اور دیر سے سگنل اندراجات
  • ترتیب دینے کے لئے متعدد پیرامیٹرز
  • سردیوں کے موسم میں پھٹکار کا شکار
  • اعلی امکان کے لئے تجارت کی فلٹرنگ نہیں

ماضی کی کارکردگی کی پیمائش گمراہ کن ہوسکتی ہے اگر واک فارورڈ ٹیسٹ نہ کیا جائے۔ محتاط اصلاح اور رسک مینجمنٹ کی ضرورت ہے۔

کلیدی ٹیوننگ پیرامیٹرز

کچھ اہم ان پٹ جو بہتر بنایا جا سکتا ہے:

  • اسکورنگ سسٹم میں EMAs/SMAs کی تعداد
  • اوسط مدت کی مدت
  • زیادہ فروخت / اپ ٹرینڈ کراس اوور کی حدیں
  • قیمت سے سٹاپ نقصان کا فاصلہ
  • منافع کا خطرہ/عائد ضرب لے لو

مضبوط حکمت عملیاں بیل ، ریچھ اور رینج سے منسلک مارکیٹوں میں کارکردگی کو متوازن کرتی ہیں۔ سخت واک فارورڈ ٹیسٹنگ منحنی فٹنگ کو روکتی ہے۔

خلاصہ

آئی 11 ایل ہائپر ٹرینڈ oversold bounces کی تجارت اور اپسائیڈ بریکآؤٹس کی سواری کے لئے ایک منظم عمل فراہم کرتا ہے۔ مناسب ترتیب اور رسک مینجمنٹ کے ساتھ ، یہ رفتار کا نقطہ نظر طویل مدتی میں برتری فراہم کرسکتا ہے۔


/*backtest
start: 2023-01-01 00:00:00
end: 2023-04-15 00:00:00
period: 8h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
// strategy("I11L Hypertrend",overlay=false, initial_capital=1000000,default_qty_value=1000000,default_qty_type=strategy.cash,commission_type=strategy.commission.percent,commission_value=0.00)
strategy.initial_capital=50000
tradingMode = input.string("Oversold or Trend", "Trading Mode", ["Oversold or Trend", "Always Buy"], tooltip="Choose the Trading Mode by trying Both in your Backtesting. I use it if one is far better then the other one.")
 
invertStrategy = tradingMode == "Trend" ? true : false
compoundingMode = input.bool(false,"Work with the total equity")
useTSL = input.bool(true,"Use a trailing SL")
useTP = input.bool(true,"Use a TP")
scoreLookbackDistance = input.int(20, step=1,title="Lookbackdistance for the Score")
scoreLoopCountTo = 20
leverage = input.float(1.0,"Leverage (x)",[20,10,5,2,1])
SL_Factor = 1 - input.float(3.0,"Risk Capital per Trade unleveraged (%)", minval=0.1, maxval=100, step=0.25) / 100 / leverage
TPFactor = input.float(1.2, step=0.1)

chooseDate = input.string(title="Select Date", defval="All available Records", options=["Start-2012","2012-Now","All available Records"],tooltip="Seperation works best for 8hr cfd markets, you might want to finetune your Settings in the past and see if the future results (2010 to now) are better then random")
dateFrom = chooseDate == "Start-2012" ? timestamp("01 Jan 1970 00:00") : chooseDate == "2012-Now" ? timestamp("01 Jan 2012 00:00") : timestamp("01 Jan 1970 00:00")
dateTo = chooseDate == "Start-2012" ? timestamp("31 Dec 2011 23:59") : chooseDate == "2012-Now" ? timestamp("31 Dec 2170 23:59") : timestamp("31 Dec 2170 23:59")
inDateRange = (time >= dateFrom) and (time < dateTo)

var disableAdditionalBuysThisDay = false
var minuteOfLastSell = 0


if(dayofmonth != dayofmonth[1])
    disableAdditionalBuysThisDay := false


longStopPrice = 0.0
longStopPrice := if (strategy.position_size > 0)
    if(useTSL)
        math.max(high * SL_Factor, longStopPrice[1])
    else
        strategy.position_avg_price*SL_Factor
else
    0

if(strategy.position_size != strategy.position_size[1])
    disableAdditionalBuysThisDay := true

//Trade Logic
//isOversold
SCORE = 0
loopCount = 1
for i=0 to scoreLoopCountTo
    trendLengthAdjusted = loopCount
    loopCount := loopCount + 1 
    if(ta.ema(close,trendLengthAdjusted) / ta.sma(close,trendLengthAdjusted) > 1)
        SCORE := SCORE + 1
 
SCORE_ema50 = ta.ema(SCORE,scoreLookbackDistance)
SCORE_sma50 = ta.sma(SCORE,scoreLookbackDistance)
isOversold = ta.crossover(SCORE_sma50 / SCORE_ema50,1.0)
isTrend = ta.crossover(SCORE_ema50 / SCORE_sma50,1.0)


isBuy = isTrend or isOversold or tradingMode == "Always Buy"


if(isBuy and not(disableAdditionalBuysThisDay) and inDateRange)
    if(compoundingMode)
        strategy.entry("Buy", strategy.long, (strategy.equity / close) * leverage)
    else
        strategy.entry("Buy", strategy.long, (strategy.initial_capital / close) * leverage)


if(strategy.position_size > 0)
    strategy.exit("TSL", "Buy", stop=longStopPrice)
    if(useTP) 
        strategy.close("Buy",  when=close > strategy.position_avg_price * (1 + (1 - SL_Factor) * TPFactor), comment="TP")


findTrendOrOversold(i) => ta.ema(close,i) / ta.sma(close,i)

plot(1 + 100 * (findTrendOrOversold(1) - 1),color = findTrendOrOversold(1) > 1 ? #6efa7b44 : #ff222244)
plot(1 + 100 * (findTrendOrOversold(2) - 1),color = findTrendOrOversold(2) > 1 ? #73fa7a44 : #ff302244)
plot(1 + 100 * (findTrendOrOversold(3) - 1),color = findTrendOrOversold(3) > 1 ? #78fb7944 : #ff3a2244)
plot(1 + 100 * (findTrendOrOversold(4) - 1),color = findTrendOrOversold(4) > 1 ? #7cfb7844 : #ff432244)
plot(1 + 100 * (findTrendOrOversold(5) - 1),color = findTrendOrOversold(5) > 1 ? #81fb7744 : #ff4b2244)
plot(1 + 100 * (findTrendOrOversold(6) - 1),color = findTrendOrOversold(6) > 1 ? #85fc7644 : #ff522344)
plot(1 + 100 * (findTrendOrOversold(7) - 1),color = findTrendOrOversold(7) > 1 ? #89fc7644 : #fe592444)
plot(1 + 100 * (findTrendOrOversold(8) - 1),color = findTrendOrOversold(8) > 1 ? #8dfc7544 : #fe602544)
plot(1 + 100 * (findTrendOrOversold(9) - 1),color = findTrendOrOversold(9) > 1 ? #91fc7444 : #fe662744)
plot(1 + 100 * (findTrendOrOversold(10) - 1),color = findTrendOrOversold(10) > 1 ? #95fd7344 : #fe6b2944)
plot(1 + 100 * (findTrendOrOversold(11) - 1),color = findTrendOrOversold(11) > 1 ? #99fd7344 : #fd712b44)
plot(1 + 100 * (findTrendOrOversold(12) - 1),color = findTrendOrOversold(12) > 1 ? #9dfd7244 : #fd762d44)
plot(1 + 100 * (findTrendOrOversold(13) - 1),color = findTrendOrOversold(13) > 1 ? #a1fd7144 : #fd7b3044)
plot(1 + 100 * (findTrendOrOversold(14) - 1),color = findTrendOrOversold(14) > 1 ? #a4fe7144 : #fd803244)
plot(1 + 100 * (findTrendOrOversold(15) - 1),color = findTrendOrOversold(15) > 1 ? #a8fe7044 : #fc853544)
plot(1 + 100 * (findTrendOrOversold(16) - 1),color = findTrendOrOversold(16) > 1 ? #abfe7044 : #fc8a3944)
plot(1 + 100 * (findTrendOrOversold(17) - 1),color = findTrendOrOversold(17) > 1 ? #affe6f44 : #fc8f3c44)
plot(1 + 100 * (findTrendOrOversold(18) - 1),color = findTrendOrOversold(18) > 1 ? #b2ff6f44 : #fc933f44)
plot(1 + 100 * (findTrendOrOversold(19) - 1),color = findTrendOrOversold(19) > 1 ? #b6ff6e44 : #fb984344)
plot(1 + 100 * (findTrendOrOversold(20) - 1),color = findTrendOrOversold(20) > 1 ? #b9ff6e44 : #fb9c4744) 

plot(invertStrategy ? SCORE_ema50 / SCORE_sma50 : SCORE_sma50 / SCORE_ema50, color=(invertStrategy and isTrend) or (not(invertStrategy) and isOversold) ? color.green : color.gray, linewidth=2)
plot(1,color=color.white)

مزید