EMA کراس اوور پر مبنی رجحان کی حکمت عملی


تخلیق کی تاریخ: 2023-09-15 11:51:34 آخر میں ترمیم کریں: 2023-09-15 11:51:34
کاپی: 0 کلکس کی تعداد: 767
1
پر توجہ دیں
1617
پیروکار

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

حکمت عملی

اس حکمت عملی میں بنیادی طور پر مندرجہ ذیل بنیادی اصولوں پر عمل کیا گیا ہے:

  1. تیز لائن ای ایم اے اور سست لائن ای ایم اے کی ترتیب ، تیز لائن ردعمل کی قیمت میں تبدیلی ، سست لائن فیصلہ رجحانات؛

  2. اس کے علاوہ ، یہ بھی کہا گیا ہے کہ اس کے بعد سے ، اس نے اپنی زندگی میں بہت زیادہ کام کیا ہے۔

  3. ای ایم اے پیرامیٹرز کا تناسب ترتیب دیں ، سست لائن کا دورانیہ ≥ 3 گنا تیز لائن ، تاکہ غلط سگنل کو کم کیا جاسکے۔

  4. آپشن صرف ایک سے زیادہ طریقوں کو منتخب کرنے کے لئے، منفی تجارت سے بچنے کے لئے.

  5. پیرامیٹرز کو بہتر بنانے کے ٹیسٹ کے لئے اپنی مرضی کے مطابق ریٹرننگ سائیکل۔

ای ایم اے کی اوسط لائن پیرامیٹرز کو ایڈجسٹ کرکے ، حساسیت کو برقرار رکھتے ہوئے استحکام کو بہتر بنایا جاسکتا ہے ، جس سے رجحان سازی کے تجارتی مواقع کو لاک کیا جاسکتا ہے۔

دوئم، حکمت عملی کے فوائد

اس حکمت عملی کا سب سے بڑا فائدہ یہ ہے کہ قواعد سادہ ہیں ، ان پر عمل درآمد آسان ہے ، اور یہ وقت محدود تاجروں کے لئے موزوں ہے۔

ایک اور فائدہ یہ ہے کہ پیرامیٹرز کو بہتر بنانے کے ذریعے بار بار غیر فعال تجارت کو کم کیا جاسکتا ہے۔

آخر میں ، آپ کو صرف ایک سے زیادہ طریقوں کا انتخاب کرنے کی ضرورت ہے ، جس میں واپسی کی تجارت کی ضرورت نہیں ہے ، جو اسٹاک مارکیٹ اور دیگر اقسام کے لئے موزوں ہے۔

تیسرا، ممکنہ خطرات

لیکن اس حکمت عملی کے ساتھ کچھ مسائل بھی ہیں:

سب سے پہلے ، EMA کی اوسط لائن خود ہی پیچھے رہ گئی ہے ، اور اس سے بہترین نقطہ نظر سے محروم ہوسکتا ہے۔

دوسرا ، پیرامیٹرز کی غلط ترتیب سے ممکنہ طور پر زیادہ فلٹرنگ کی وجہ سے ورڈ میں نقص پیدا ہوسکتا ہے۔

آخر میں ، اسٹاپ نقصان کے طریقہ کار کو بہتر اور بہتر بنایا جانا چاہئے۔

چار مضامین، خلاصہ

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

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

//@version=4
// 
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © gregoirejohnb
//
// Moving average crossover systems measure drift in the market. They are great strategies for time-limited people.
// So, why don't more people use them?
// 
// I think it's due to poor choice in choosing EMA lengths: Market Wizard Ed Seykota has a guideline for moving average crossovers: the slow line should be at least 3x the fast line.
// This removes a lot of the whipsaws inherent in moving average systems, which means greater profitability.
// His other piece of advice: long-only strategies are best in stock markets where there's a lot more upside potential.
//
// Using these simple rules, we can reduce a lot of the whipsaws and low profitability trades! This strategy was made so you can see for yourself before trading.
//
// === HOW TO USE THIS INDICATOR ===
// 1) Choose your market and timeframe.
// 2) Choose the length.
// 3) Choose the multiplier.
// 4) Choose if the strategy is long-only or bidirectional. 
//
// Don't overthink the above! We don't know the best answers, that's why this strategy exists! We're going to test and find out.
//  After you find a good combination, set up an alert system with the default Exponential Moving Average indicators provided by TradingView.
//
// === TIPS ===
// Increase the multiplier to reduce whipsaws (back and forth trades).
// Increase the length to take fewer trades, decrease the length to take more trades.
// Try a Long-Only strategy to see if that performs better.
//
strategy(title="EMA Crossover Strategy", shorttitle="EMA COS", overlay=true, pyramiding=0, default_qty_type=strategy.percent_of_equity, default_qty_value=10, currency=currency.USD,commission_type=strategy.commission.percent,commission_value=0.1)

// === GENERAL INPUTS ===
//strategy start date
start_year = input(defval=2020, title="Backtest Start Year")

// === LOGIC ===
length = input(type=input.integer,defval=20,minval=1,title="Length")
ratio = input(type=input.integer,defval=3,title="Multiplier (3x length, 4x length, etc)",options=[3,4,5,6,7,8,9,10])
longOnly = input(type=input.bool,defval=false,title="Long Only")
fast = ema(hl2,length)
slow = ema(hl2,length * ratio)
plot(fast,linewidth=2,color=color.orange,title="Fast")
plot(slow,linewidth=2,color=color.blue,title="Slow")

longEntry = crossover(fast,slow)
shortEntry = crossunder(fast,slow)

plotshape(longEntry ? close : na,style=shape.triangleup,color=color.green,location=location.belowbar,size=size.small,title="Long Triangle")
plotshape(shortEntry and not longOnly ? close : na,style=shape.triangledown,color=color.red,location=location.abovebar,size=size.small,title="Short Triangle")
plotshape(shortEntry and longOnly ? close : na,style=shape.xcross,color=color.black,location=location.abovebar,size=size.small,title="Exit Sign")

// === STRATEGY - LONG POSITION EXECUTION ===
enterLong() =>
    crossover(fast,slow) and 
       time > timestamp(start_year, 1, 1, 01, 01)
exitLong() =>
    longOnly and crossunder(fast,slow)
strategy.entry(id="Long", long=strategy.long, when=enterLong())
strategy.close(id="Long", when=exitLong())
// === STRATEGY - SHORT POSITION EXECUTION ===
enterShort() =>
    not longOnly and crossunder(fast,slow) and 
       time > timestamp(start_year, 1, 1, 01, 01)
exitShort() =>
    false
strategy.entry(id="Short", long=strategy.short, when=enterShort())
strategy.close(id="Short", when=exitShort())