دوہری ٹریک سسٹم مومنٹم ٹریڈنگ کی حکمت عملی


تخلیق کی تاریخ: 2023-11-22 15:26:28 آخر میں ترمیم کریں: 2023-11-22 15:26:28
کاپی: 0 کلکس کی تعداد: 623
1
پر توجہ دیں
1617
پیروکار

دوہری ٹریک سسٹم مومنٹم ٹریڈنگ کی حکمت عملی

[trans]

جائزہ

اس حکمت عملی میں MACD اور Stoch RSI دونوں اشارے کا استعمال کیا گیا ہے ، جس میں دوہری ٹریڈنگ سسٹم بنایا گیا ہے ، جس میں رجحانات کی پیروی اور اوورلوڈ اور اوورلوڈ فیصلے کی اجازت دی گئی ہے۔ حکمت عملی ایک ہی وقت میں دن کی لائن اور 4 گھنٹے کی لائن پر اشارے کی تعمیر کرتی ہے ، جس میں متعدد ٹائم فریم فیصلے کی اجازت دی جاتی ہے ، جس سے غلط فیصلے کی امکان کم ہوجاتی ہے۔

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

اسٹریٹجک پورٹ فولیو MACD اور Stoch RSI دو مختلف قسم کے تکنیکی اشارے کا استعمال کرتا ہے ، ان کی تشکیل کے لئے۔ MACD ایک متغیر اشارے ہے ، جس کی قیمت میں تبدیلی کی رفتار کا فیصلہ کیا جاتا ہے۔ Stoch RSI ایک اوورلوڈ اوورلوڈ اشارے ہے ، جس کا فیصلہ کیا جاتا ہے کہ قیمت نسبتا strong مضبوط ہے۔

حکمت عملی سب سے پہلے MACD اور Stoch RSI اشارے کو یومیہ لائن اور 4 گھنٹوں کی لائن پر بناتی ہے تاکہ رجحان اور اوور خرید اوور فروخت کا فیصلہ کیا جاسکے۔ جب دونوں ٹائم پیریڈ کے اشارے بیک وقت خرید / فروخت سگنل دیتے ہیں تو ، خرید / فروخت کے لئے اسی طرح کی کارروائی کی جاتی ہے۔

خاص طور پر ، MACD اشارے کی تعمیر ، DIF لائن اور DEA لائنوں کو سنہری کانٹا کا فیصلہ کرنے کے لئے تشکیل دیا گیا ہے۔ اسٹوک RSI اشارے کی تعمیر ، K لائن اور D لائنیں سنہری کانٹا کا فیصلہ کرنے کے لئے تشکیل دی گئیں۔ جب اشارے کے دونوں سیٹ بیک وقت سنہری کانٹا کرتے ہیں تو خریدنے کا اشارہ دیتے ہیں اور بیک وقت سنہری کانٹا کرتے ہیں تو بیچنے کا اشارہ دیتے ہیں۔

اس طرح ، حکمت عملی میں دوہری ریل اشارے اور کثیر ٹائم فریم فیصلے کا استعمال کیا جاتا ہے تاکہ قیمتوں میں تبدیلی کی رفتار اور نسبتا strength کمزوری کا جامع فیصلہ کیا جاسکے ، جس سے فیصلہ سازی کی درستگی میں اضافہ اور بہتر منافع حاصل کرنے میں مدد ملے۔

طاقت کا تجزیہ

اس حکمت عملی کے درج ذیل فوائد ہیں:

  1. ڈبل ریل انڈیکیٹرز کا مجموعہ ، جامع فیصلے اور بہتر فیصلہ سازی کی درستگی
  2. ایک سے زیادہ ٹائم فریم استعمال کریں تاکہ غلط فہمیوں کا خطرہ کم ہو
  3. ٹرینڈ ٹریک اور اوور بیئر اوور سیل فیصلے کا استعمال کرتے ہوئے ، قیمتوں میں تبدیلی کی رفتار اور نسبتا weak کمزوری کو جامع طور پر مدنظر رکھنا
  4. مختلف اقسام اور مارکیٹ کے حالات کے مطابق انڈیکس پیرامیٹرز کو ایڈجسٹ کیا جا سکتا ہے
  5. واضح کوڈ کی ساخت، سمجھنے اور توسیع کرنے میں آسان

خطرے کا تجزیہ

اس حکمت عملی کے کچھ خطرات بھی ہیں:

  1. مارکیٹ میں سسٹم کا خطرہ ہے جس سے مکمل طور پر بچا نہیں جا سکتا
  2. اشارے کے پیرامیٹرز کو غلط ترتیب دینے سے تجارت کی کثرت یا کھوئے ہوئے مواقع پیدا ہوسکتے ہیں
  3. دو ریل اشارے کے ساتھ ساتھ غلط سگنل دینے کا امکان موجود ہے ، لیکن ایک ہی اشارے سے کم
  4. بڑے پیمانے پر بلیک سوان جیسے تیزی سے بدلتے ہوئے بازاروں کا مقابلہ کرنے سے قاصر

ردعمل:

  1. پیرامیٹرز کو بہتر بنائیں ، خرید و فروخت کی شرائط کو ایڈجسٹ کریں ، غلطیوں کو کم کریں
  2. زیادہ سے زیادہ اشارے کے ساتھ مجموعہ، مزید فیصلے کی بنیاد
  3. نقصان کی روک تھام کی حکمت عملی کو بڑھانا اور ایک بار نقصان کا خطرہ کنٹرول کرنا

اصلاح کی سمت

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

  1. زیادہ سے زیادہ اشارے شامل کرنے کے لئے، ایک کثیر اشارے کی حکمت عملی کی تعمیر
  2. مشین لرننگ الگورتھم میں اضافہ ، متحرک پیرامیٹرز کی اصلاح
  3. جذبات کے اشارے، خبروں کی سطح اور دیگر عوامل کے ساتھ مارکیٹ کی صورتحال کا اندازہ لگانا
  4. زیادہ سے زیادہ نقصانات کو روکنے اور روکنے کی حکمت عملی، بہتر فنڈ مینجمنٹ
  5. تجارت کے بہتر مواقع کی تلاش کے لیے مزید اقسام کی تجارت میں اضافہ کرنا

خلاصہ کریں۔

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

||

Overview

This strategy combines the MACD and Stoch RSI indicators to build a dual-rail trading system for trend tracking and oversold/overbought judgment. The strategy also builds indicators on the daily and 4-hour timeframes to make multi-timeframe judgments to reduce misjudgment probability.

Strategy Principle

The strategy combines the MACD and Stoch RSI indicators, which are different types of technical indicators, for configuration. MACD is a momentum indicator that judges price change velocity; Stoch RSI is an overbought/oversold indicator that judges relative price strength.

The strategy first constructs the MACD and Stoch RSI indicators on the daily and 4-hour timeframes respectively for trend and overbought/oversold judgments. When signals are triggered on both timeframes, corresponding buy/sell operations are performed.

Specifically, the MACD indicator is constructed with the DIF and DEA lines forming golden/dead crosses for judgment; the Stoch RSI indicator is constructed with the K and D lines forming golden/dead crosses for judgment. When both indicator pairs have golden crosses, buy signals are generated; when both have dead crosses, sell signals are generated.

Thus, by comprehensively applying the dual-indicator system and multi-timeframe judgments, the strategy judges price velocity and relative strength thoroughly, which helps improve decision accuracy and gain better returns.

Advantage Analysis

This strategy has the following advantages:

  1. Combining dual-indicator system for comprehensive judgment and higher decision accuracy
  2. Applying multi-timeframe to reduce misjudgment probability
  3. Adopting trend tracking and overbought/oversold judgment for consideration of both price velocity and relative strength
  4. Flexible indicator parameters adjustable for different products and market environments
  5. Clean code structure easy to understand and expand

Risk Analysis

There are also some risks with this strategy:

  1. There exist systemic market risks that cannot be fully avoided
  2. Inappropriate indicator parameter settings may lead to overtrading or missing opportunities
  3. Dual indicators may still give concurrent wrong signals, but less likely than single ones
  4. Unable to cope with drastic market changes like black swan events

Countermeasures:

  1. Optimize parameters and adjust trading conditions to reduce misjudgments
  2. Incorporate more indicators for combined judgments
  3. Add stop loss mechanisms to control single loss risk

Optimization Directions

This strategy can also be improved in the following aspects:

  1. Incorporate more indicators for multi-indicator strategies
  2. Add machine learning algorithms for dynamic parameter optimization
  3. Combine sentiment indicators, news etc. for more comprehensive market condition judgments
  4. Add stop loss, take profit strategies to optimize money management
  5. Expand to more trading products to discover better opportunities

Conclusion

By combined application of the dual-indicator system and multi-timeframe judgments, this strategy judges price velocity and relative strength thoroughly, which can effectively capture market trends and improve deficiencies of single indicators. It also has advantages like flexible parameter tuning, easy understanding and expansion. Further expansions by multi-indicator combination, dynamic parameter optimization, sentiment indicator incorporation etc. can help boost strategy performance. [trans]

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

//@version=2
strategy(title='[RS]Khizon (UWTI) Strategy V0', shorttitle='K', overlay=false, pyramiding=0, initial_capital=100000, currency=currency.USD)
//  ||  Inputs:
macd_src = input(title='MACD Source:',  defval=close)
macd_fast = input(title='MACD Fast Length:',  defval=12)
macd_slow = input(title='MACD Slow Length:',  defval=26)
macd_signal_smooth = input(title='MACD Signal Smoothing:',  defval=9)
srsi_src = input(title='SRSI Source:',  defval=close)
srsi_rsi_length = input(title='SRSI RSI Length:',  defval=14)
srsi_stoch_length = input(title='SRSI Stoch Length:',  defval=14)
srsi_smooth = input(title='SRSI Smoothing:',  defval=3)
srsi_signal_smooth = input(title='SRSI Signal Smoothing:',  defval=3)
//  ||  Strategy Inputs:
trade_size = input(title='Trade Size in USD:', type=float, defval=1)
buy_trade = input(title='Perform buy trading?', type=bool, defval=true)
sel_trade = input(title='Perform sell trading?', type=bool, defval=true)
//  ||  MACD(close, 12, 26, 9):     ||---------------------------------------------||
f_macd_trigger(_src, _fast, _slow, _signal_smooth)=>
    _macd = ema(_src, _fast) - ema(_src, _slow)
    _signal = sma(_macd, _signal_smooth)
    _return_trigger = _macd >= _signal ? true : false
//  ||  Stoch RSI(close, 14, 14, 3, 3)  ||-----------------------------------------||
f_srsi_trigger(_src, _rsi_length, _stoch_length, _smooth, _signal_smooth)=>
    _rsi = rsi(_src, _rsi_length)
    _stoch = sma(stoch(_rsi, _rsi, _rsi, _stoch_length), _smooth)
    _signal = sma(_stoch, _signal_smooth)
    _return_trigger = _stoch >= _signal ? true : false
//  ||-----------------------------------------------------------------------------||
//  ||-----------------------------------------------------------------------------||
//  ||  Check Directional Bias from daily timeframe:
daily_trigger = security('USOIL', 'D', f_macd_trigger(macd_src, macd_fast, macd_slow, macd_signal_smooth) and f_srsi_trigger(srsi_src, srsi_rsi_length, srsi_stoch_length, srsi_smooth, srsi_signal_smooth))
h4_trigger = security('USOIL', '240', f_macd_trigger(macd_src, macd_fast, macd_slow, macd_signal_smooth) and f_srsi_trigger(srsi_src, srsi_rsi_length, srsi_stoch_length, srsi_smooth, srsi_signal_smooth))

plot(title='D1T', series=daily_trigger?0:na, style=circles, color=blue, linewidth=4, transp=65)
plot(title='H4T', series=h4_trigger?0:na, style=circles, color=navy, linewidth=2, transp=0)

sel_open = sel_trade and not daily_trigger and not h4_trigger
buy_open = buy_trade and daily_trigger and h4_trigger
sel_close = not buy_trade and daily_trigger and h4_trigger
buy_close = not sel_trade and not daily_trigger and not h4_trigger
strategy.entry('sel', long=false, qty=trade_size, comment='sel', when=sel_open)
strategy.close('sel', when=sel_close)
strategy.entry('buy', long=true, qty=trade_size, comment='buy', when=buy_open)
strategy.close('buy', when=buy_close)