ایک سے زیادہ متحرک اوسط نظام پر مبنی مشترکہ تجارتی حکمت عملی


تخلیق کی تاریخ: 2023-09-20 16:42:37 آخر میں ترمیم کریں: 2023-09-20 16:42:37
کاپی: 2 کلکس کی تعداد: 783
1
پر توجہ دیں
1617
پیروکار

جائزہ

یہ حکمت عملی T3 اوسط ، T3 گولڈ اسپلٹ اوسط ، اور MavilimW ویٹڈ موونگ اوسط کا استعمال کرتے ہوئے تجارت کا اشارہ کرتی ہے جب قیمت اور اوسط کے مابین تعلقات میں تبدیلی آتی ہے۔ یہ ایک رجحان کی پیروی کرنے والی حکمت عملی ہے۔

حکمت عملی کا اصول

  1. T3 اوسط ، T3 گولڈ اسپلٹ اوسط اور MavilimW ویٹڈ مووینگ اوسط کا حساب لگائیں۔

  2. قیمت اور اوسط لائن کے درمیان ٹوٹنے اور پیچھے ہٹنے سے خرید و فروخت کے سگنل پیدا ہوسکتے ہیں۔

  3. متعدد اوسط لائنوں کے ساتھ مل کر ، سگنل کے معیار کو بہتر بنانے کے لئے تجارتی سگنل فلٹرنگ کی جاسکتی ہے۔

  4. اسٹاپ نقصان کی حکمت عملی کا تعین کریں تاکہ آپ کے نقصانات پر قابو پایا جا سکے۔

  5. ایک سے زیادہ ایک لائن ٹریڈنگ سسٹم کو الگ الگ یا مجموعہ میں استعمال کرنے کا انتخاب کریں۔

طاقت کا تجزیہ

  1. ایک سے زیادہ اوسط لائن کا مجموعہ سگنل کی درستگی کو بہتر بناتا ہے اور ایک دوسرے کی تصدیق کرتا ہے۔

  2. ہر اوسط لائن رجحان کی تبدیلیوں کے لئے مختلف ردعمل ہے، اور مجموعہ کا استعمال فائدہ اٹھا سکتا ہے.

  3. ٹریڈنگ سگنل انٹیکٹو ، مساوی لائنوں کے تعلقات سے تشکیل پاتے ہیں۔

  4. اسٹاپ نقصان کی ترتیب خطرے کو کنٹرول کرنے میں مدد کرتی ہے۔

  5. کوڈ واضح ہے، اصولوں کو سمجھنے اور اپنی مرضی کے مطابق کرنے کے لئے آسان.

خطرے کا تجزیہ

  1. اس کے علاوہ، غلط سگنل کے نتیجے میں نقصانات کا سبب بن سکتا ہے.

  2. قیمت کے رجحان میں رکاوٹ کا مؤثر اندازہ لگانے کے لئے ناکامی.

  3. غلط میڈین لائن پیرامیٹرز کی ترتیب حکمت عملی کی کارکردگی کو متاثر کرتی ہے۔

  4. آپ کو اپنے اسٹاک میں بار بار تبدیلیاں کرنے کی ضرورت پڑسکتی ہے ، جس سے آپ کے لین دین کے اخراجات میں اضافہ ہوسکتا ہے۔

  5. آپٹمائزیشن کے عمل میں ممکنہ حد سے زیادہ اصلاح سے زیادہ فٹ ہونے کا سبب بن سکتا ہے۔

اصلاح کی سمت

  1. مختلف اوسط لائن پیرامیٹرز کی جانچ کریں اور بہترین مجموعہ تلاش کریں۔

  2. دیگر رجحانات کے اشارے کا جائزہ لیں اور سگنل فلٹرنگ شامل کریں.

  3. اسٹاپ نقصان کی حکمت عملی کے پیرامیٹرز کو بہتر بنانا ، جس سے انفرادی نقصان کا خطرہ کم ہوجائے۔

  4. قیمتوں کے سائیکل کے نمونوں کا مطالعہ کریں اور رجحانات میں رکاوٹوں کا تعین کریں.

  5. ٹرینڈ اشارے شامل کریں تاکہ غیر ضروری تجارت کو تبدیل نہ کیا جاسکے۔

  6. متحرک پوزیشن مینجمنٹ حکمت عملی کو اپنانا ، فنڈز کے استعمال کی کارکردگی کو بہتر بنانا۔

خلاصہ کریں۔

اس حکمت عملی میں متعدد مساوی لین دین کے نظاموں کا امتزاج کیا گیا ہے ، جس سے ایک دوسرے کی توثیق کرنے والے تجارتی سگنل بنتے ہیں۔ تاہم ، متعدد مساوی لائنوں کے امتزاج میں غلط سگنل کا خطرہ بھی موجود ہے۔ اس کو مستقل پیرامیٹرز کی اصلاحی جانچ کی ضرورت ہے ، اور اس کو ایک مستحکم رجحان سے باخبر رہنے کی حکمت عملی بنانے کے لئے خطرے کے کنٹرول کے ذریعہ اس کی مدد کی جائے گی۔

حکمت عملی کا ماخذ کوڈ
/*backtest
start: 2022-09-13 00:00:00
end: 2023-09-19 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
//creator&compiler: Bartu Altan
//inspired by: KIVANÇ ÖZBİLGİÇ @fr3792 and @mavilim0732 on twitter
//With courtesy of Kıvanç Özbilgiç, Permission Pending

strategy("Tilson T3, Tilson T3 Fibo and MavilimW Combined Strategy Strategy",shorttitle="T3 and MavilimW Strategy", initial_capital=100,currency=currency.USD,default_qty_type=strategy.percent_of_equity,default_qty_value =75,overlay=true)
stop_loss=input(defval=3.0,title="Stop Loss %",type=input.float)*0.01
strategyt3 = input(true,"T3")
strategyt3Fibo = input(true,"T3 Fibo Cross")
strategyMav = input(true,"MavilimW")
fmal=input(3,"First Moving Average length")
smal=input(5,"Second Moving Average length")
barsSinceCloseUnderMavw = input(5,"Bars Since Close Under MAVW")
T3FiboLine = input(false, title="Show T3 Fibonacci Ratio Line?")
length1 = input(8, "T3 Length")
a1 = input(0.7, "Volume Factor")

// BEGINNING OF T3

e1 = ema((high + low + 2 * close) / 4, length1)
e2 = ema(e1, length1)
e3 = ema(e2, length1)
e4 = ema(e3, length1)
e5 = ema(e4, length1)
e6 = ema(e5, length1)
c1 = -a1 * a1 * a1
c2 = 3 * a1 * a1 + 3 * a1 * a1 * a1
c3 = -6 * a1 * a1 - 3 * a1 - 3 * a1 * a1 * a1
c4 = 1 + 3 * a1 + a1 * a1 * a1 + 3 * a1 * a1
T3 = c1 * e6 + c2 * e5 + c3 * e4 + c4 * e3

col1t3 = T3 > T3[1]
col3t3 = T3 < T3[1]
color_1 = col1t3 ? color.green : col3t3 ? color.red : color.yellow
plot(strategyt3 or strategyt3Fibo ? T3:na, color=color_1, linewidth=3, title="T3")

//T3 Fibo

length12 = input(5, "T3 Length fibo")
a12 = input(0.618, "Volume Factor fibo")

e12 = ema((high + low + 2 * close) / 4, length12)
e22 = ema(e12, length12)
e32 = ema(e22, length12)
e42 = ema(e32, length12)
e52 = ema(e42, length12)
e62 = ema(e52, length12)
c12 = -a12 * a12 * a12
c22 = 3 * a12 * a12 + 3 * a12 * a12 * a12
c32 = -6 * a12 * a12 - 3 * a12 - 3 * a12 * a12 * a12
c42 = 1 + 3 * a12 + a12 * a12 * a12 + 3 * a12 * a12
T32 = c12 * e62 + c22 * e52 + c32 * e42 + c42 * e32

col12 = T32 > T32[1]
col32 = T32 < T32[1]
color2 = col12 ? color.blue : col32 ? color.purple : color.yellow
plot(strategyt3Fibo and T3FiboLine and T32 ? T32 : na, color=color2, linewidth=2, title="T3fibo")

//End of T3 Fibo

// END OF T3



// MAVİLİMW //

tmal=fmal+smal
Fmal=smal+tmal
Ftmal=tmal+Fmal
Smal=Fmal+Ftmal

M1= wma(close, fmal)
M2= wma(M1, smal)
M3= wma(M2, tmal)
M4= wma(M3, Fmal)
M5= wma(M4, Ftmal)
MAVW= wma(M5, Smal)
col1= MAVW>MAVW[1]
col3= MAVW<MAVW[1]
colorM = col1 ? color.blue : col3 ? color.red : color.yellow
plot(strategyMav ?MAVW:na,title="MAVW",color=colorM,linewidth=2)

// END OF MAVILIMW

// Long Conditions // 

longT3single = strategyt3 and not(strategyt3Fibo) and not(strategyMav) ? crossover(close,T3) and barssince(crossunder(close,T3)) > barsSinceCloseUnderMavw : na
longT3Fibo = not(strategyt3) and strategyt3Fibo and not(strategyMav) ? crossover(T32,T3):na
longMav = not(strategyt3) and not(strategyt3Fibo) and strategyMav ? crossover(close,MAVW) and barssince(crossunder(close,MAVW)) > barsSinceCloseUnderMavw : na

longT3WFiboandMav = strategyt3 and strategyt3Fibo and strategyMav ? close > T3 and close > MAVW and T32 > T3 : na
longT3WFibo = strategyt3 and strategyt3Fibo and not(strategyMav) ? (crossover(T32,T3)  and close > T3) or (T32>T3 and crossover(close,T3) and barssince(crossunder(close,T3)) > barsSinceCloseUnderMavw):na
longMavT3Fibo = not(strategyt3) and strategyt3Fibo and strategyMav ? (crossover(T32,T3) and close > MAVW) or (T32>T3 and crossover(close,MAVW) and barssince(crossunder(close,MAVW)) > barsSinceCloseUnderMavw) : na
longMavT3 = (strategyt3) and not(strategyt3Fibo) and strategyMav ? (crossover(close,T3) and barssince(crossunder(close,T3)) > barsSinceCloseUnderMavw and close>MAVW) or (crossover(close,MAVW) and barssince(crossunder(close,MAVW)) > barsSinceCloseUnderMavw and close>T3) : na

longchosen = longT3single or longT3Fibo or longMav or longT3WFiboandMav or longT3WFibo or longMavT3Fibo or longMavT3

// Long Close Conditions // 
longcT3single = strategyt3 and not(strategyt3Fibo) and not(strategyMav) ? crossunder(close,T3) : na
longcT3Fibo = not(strategyt3) and strategyt3Fibo and not(strategyMav) ? crossunder(T32,T3):na
longcMav = not(strategyt3) and not(strategyt3Fibo) and strategyMav ? crossunder(close,MAVW): na

longcT3WFiboandMav = strategyt3 and strategyt3Fibo and strategyMav ? close < T3 and close < MAVW and T32 < T3 : na
longcT3WFibo = strategyt3 and strategyt3Fibo and not(strategyMav) ? (crossunder(T32,T3)  and close < T3) or (T32<T3 and crossunder(close,T3)):na
longcMavT3Fibo = not(strategyt3) and strategyt3Fibo and strategyMav ? (crossunder(T32,T3) and close < MAVW) or (T32<T3 and crossunder(close,MAVW)):  na
longcMavT3 = (strategyt3) and not(strategyt3Fibo) and strategyMav ? (crossunder(close,T3) and close<MAVW) or (crossunder(close,MAVW) and close<T3) : na

longclosechosen = longcT3single or longcT3Fibo or longcMav or longcT3WFiboandMav or longcT3WFibo or longcMavT3Fibo or longcMavT3

// t3 fibo //



long = longchosen
longclose = longclosechosen
long_plot = barssince(long[1])>barssince(longclose[1])?long:na
longclose_plot = barssince(longclose[1])>barssince(long[1])?longclose:na

plotshape(long_plot,title="Long",style=shape.labelup,color=color.green,text="Long",textcolor=color.white, location=location.abovebar)
plotshape(longclose_plot,title="Long Close",style=shape.labeldown,color=#B1E141,text="Long Close",textcolor=color.white,location=location.belowbar)

// Short Conditions // 

shortT3single = strategyt3 and not(strategyt3Fibo) and not(strategyMav) ? crossunder(close,T3) and barssince(crossover(close,T3)) > barsSinceCloseUnderMavw : na
shortT3Fibo = not(strategyt3) and strategyt3Fibo and not(strategyMav) ? crossunder(T32,T3):na
shortMav = not(strategyt3) and not(strategyt3Fibo) and strategyMav ? crossunder(close,MAVW) and barssince(crossover(close,MAVW)) > barsSinceCloseUnderMavw : na

shortT3WFiboandMav = strategyt3 and strategyt3Fibo and strategyMav ? close < T3 and close < MAVW and T32 < T3 : na
shortT3WFibo = strategyt3 and strategyt3Fibo and not(strategyMav) ? (crossunder(T32,T3)  and close < T3) or (T32<T3 and crossunder(close,T3) and barssince(crossover(close,T3)) > barsSinceCloseUnderMavw):na
shortMavT3Fibo = not(strategyt3) and strategyt3Fibo and strategyMav ? (crossunder(T32,T3) and close < MAVW) or (T32<T3 and crossunder(close,MAVW) and barssince(crossover(close,MAVW)) > barsSinceCloseUnderMavw) : na
shortMavT3 = (strategyt3) and not(strategyt3Fibo) and strategyMav ? (crossunder(close,T3) and barssince(crossover(close,T3)) > barsSinceCloseUnderMavw and close<MAVW) or (crossunder(close,MAVW) and barssince(crossover(close,MAVW)) > barsSinceCloseUnderMavw and close<T3) : na

shortchosen = shortT3single or shortT3Fibo or shortMav or shortT3WFiboandMav or shortT3WFibo or shortMavT3Fibo or shortMavT3

// Long Close Conditions // 
shortcT3single = strategyt3 and not(strategyt3Fibo) and not(strategyMav) ? crossover(close,T3) : na
shortcT3Fibo = not(strategyt3) and strategyt3Fibo and not(strategyMav) ? crossover(T32,T3):na
shortcMav = not(strategyt3) and not(strategyt3Fibo) and strategyMav ? crossover(close,MAVW): na

shortcT3WFiboandMav = strategyt3 and strategyt3Fibo and strategyMav ? close > T3 and close > MAVW and T32 > T3 : na
shortcT3WFibo = strategyt3 and strategyt3Fibo and not(strategyMav) ? (crossover(T32,T3)  and close > T3) or (T32>T3 and crossover(close,T3)):na
shortcMavT3Fibo = not(strategyt3) and strategyt3Fibo and strategyMav ? (crossover(T32,T3) and close > MAVW) or (T32>T3 and crossover(close,MAVW)):  na
shortcMavT3 = (strategyt3) and not(strategyt3Fibo) and strategyMav ? (crossover(close,T3) and close>MAVW) or (crossover(close,MAVW) and close>T3) : na

shortclosechosen = shortcT3single or shortcT3Fibo or shortcMav or shortcT3WFiboandMav or shortcT3WFibo or shortcMavT3Fibo or shortcMavT3

short = shortchosen
shortclose = shortclosechosen
short_plot = barssince(short[1])>barssince(shortclose[1])?short:na
shortclose_plot = barssince(shortclose[1])>barssince(short[1])?shortclose:na



plotshape(short_plot,title="Short",style=shape.labeldown,color=color.red,text="Short",textcolor=color.white,location=location.abovebar)
plotshape(shortclose_plot,title="Short Close",style=shape.labeldown,color=#E19B89,text="Short Close",textcolor=color.white,location=location.belowbar)


strategy.entry("Long", true, when=long_plot)
strategy.close("Long",when=longclose_plot)
strategy.exit("Long Stop Loss","Long",stop=strategy.position_avg_price*(1-stop_loss))

strategy.entry("Short", false, when=short_plot)
strategy.close("Short",when=shortclose_plot)
strategy.exit("Short Stop Loss","Short",stop=strategy.position_avg_price*(1+stop_loss))