سی سی آئی میڈین ریورس چینل کی حکمت عملی

مصنف:چاؤ ژانگ، تاریخ: 2023-11-01 16:20:45
ٹیگز:

img

جائزہ

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

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

  1. مارکیٹ کے رجحانات کا تعین کرنے کے لئے سی سی آئی زیرو لائن کراس اوورز کا استعمال کریں۔ سی سی آئی زیرو سے اوپر کراسنگ ایک تیزی کا اشارہ ہے اور اس سے نیچے کراسنگ ایک bearish اشارہ ہے۔

  2. اپنی مرضی کے مطابق سی سی آئی کے اوپری اور نچلے بینڈ مرتب کریں۔ سی سی آئی کے اوپری بینڈ سے اوپر کا کراسنگ تیزی ہے اور نچلے بینڈ سے نیچے کا کراسنگ bearish ہے۔ بینڈ کراس اوور اسٹاپ کے طور پر کام کرتے ہیں۔

  3. صرف مخصوص ٹائم فریم میں تجارت کرنے اور ان ادوار کے باہر تمام پوزیشن بند کرنے کا اختیار۔ مقررہ روزانہ ٹائم فریم میں بھی تجارت کر سکتے ہیں۔

  4. سٹاپ نقصان مقرر کریں اور منافع کا فیصد لیں.

  5. داخلہ اور باہر نکلنے کے سگنل کے لئے اپنی مرضی کے مطابق انتباہی پیغامات.

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

فوائد کا تجزیہ

  1. سی سی آئی قیمتوں کی تبدیلیوں کے لئے حساس ہے، رجحان کی تبدیلیوں کو پکڑنے کے لئے اچھا ہے.

  2. اپنی مرضی کے مطابق بینڈ مختلف مارکیٹوں کے لئے ایڈجسٹ کیے جاسکتے ہیں۔ بینڈ کراس اسٹاپس خطرے کو کنٹرول کرنے میں مدد کرتے ہیں۔

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

  4. اسٹاپ نقصان / منافع حاصل کرنے کے لئے مقررہ خطرے / منافع کے تناسب اور خطرے کی حد.

  5. مکمل طور پر حسب ضرورت پیرامیٹرز مختلف مصنوعات اور مارکیٹ کے حالات کے لئے حکمت عملی کو بہتر بناتے ہیں.

خطرے کا تجزیہ

  1. سی سی آئی کو جھوٹے سگنلز کا سامنا کرنا پڑتا ہے ، انہیں طویل وقت کے اشارے والے اشاروں کی تصدیق کرنی چاہئے۔

  2. فکسڈ اسٹاپ/ٹیک فی صد بدلتے ہوئے مارکیٹ کے حالات کے مطابق نہیں بن سکتے۔

  3. مقررہ ٹائم فریم میں ٹریڈنگ کے دوران مواقع کی کمی کا خطرہ ہوتا ہے۔

  4. پیرامیٹرز کی کثرت سے اصلاحات سے زیادہ تجارت یا لاپتہ تجارت ہوسکتی ہے۔

  5. میکرو عوامل پر غور کیا جانا چاہئے ، صرف اصلاح ہی خطرات کو ختم کرنے کے لئے کافی نہیں ہے۔

اصلاح کی ہدایات

  1. سی سی آئی سگنلز کی تصدیق کے لیے طویل ٹائم فریم اشارے شامل کریں۔

  2. متحرک رکاوٹیں / لے جیسے ATR شامل کریں.

  3. مختلف وقت کے فریم میں پیرامیٹرز کی جانچ کریں اور اعلی کارکردگی کے ادوار تلاش کریں۔

  4. بدلتی ہوئی منڈیوں کے لئے سی سی آئی پیرامیٹرز اور بینڈ کو بہتر بنائیں۔

  5. دیگر عوامل جیسے اتار چڑھاؤ اور حجم کو شامل کرنے پر غور کریں.

  6. تجارت کی جانے والی مصنوعات کے لئے مناسب ٹائم فریم منتخب کریں۔

  7. حکمت عملی کی اصلاحات کو خودکار کرنے کے لئے مشین لرننگ پر غور کریں۔

خلاصہ

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


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

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © REV0LUTI0N

//@version=4

strategy(title="CCI Strategy", overlay=true, initial_capital = 10000, default_qty_value = 10000, default_qty_type = strategy.cash)


//CCI Code

length = input(20, minval=1, title="CCI Length")
src = input(close, title="Source")
ma = sma(src, length)
cci = (src - ma) / (0.015 * dev(src, length))


// Strategy Backtesting
startDate  = input(timestamp("2099-10-01T00:00:00"), type = input.time, title='Backtesting Start Date')
finishDate = input(timestamp("9999-12-31T00:00:00"), type = input.time, title='Backtesting End Date')

time_cond  = true


//Time Restriction Settings
startendtime = input("", title='Time Frame To Enter Trades')
enableclose = input(false, title='Enable Close Trade At End Of Time Frame')
timetobuy = true
timetoclose = true


//Strategy Settings

//Strategy Settings - Enable Check Boxes
enableentry = input(true, title="Enter First Trade ASAP")
enableconfirmation = input(false, title="Wait For Cross To Enter First Trade")
enablezero =input(true, title="Use CCI Simple Cross Line For Entries & Exits")
enablebands = input(false, title="Use Upper & Lower Bands For Entries & Exits")

//Strategy Settings - Band Sources
ccisource = input(0, title="CCI Simple Cross")
upperbandsource =input(100, title="CCI Enter Long Band")
upperbandexitsource =input(100, title="CCI Exit Long Band")
lowerbandsource =input(-100, title="CCI Enter Short Band")
lowerbandexitsource =input(-100, title="CCI Exit Short Band")

//Strategy Settings - Crosses
simplecrossup = crossover(cci, ccisource)
simplecrossdown = crossunder(cci, ccisource)
uppercrossup = crossover(cci, upperbandsource)
lowercrossdown = crossunder(cci, lowerbandsource)
uppercrossdown = crossunder(cci, upperbandexitsource)
lowercrossup = crossover(cci, lowerbandexitsource)
upperstop = crossunder(cci, upperbandsource)
lowerstop = crossover(cci, lowerbandsource)


// Stop Loss & Take Profit % Based
enablesl = input(false, title='Enable Stop Loss')
enabletp = input(false, title='Enable Take Profit')
stopTick = input(5.0, title='Stop Loss %', type=input.float, step=0.1) / 100
takeTick = input(10.0, title='Take Profit %', type=input.float, step=0.1) / 100

longStop = strategy.position_avg_price * (1 - stopTick)
shortStop = strategy.position_avg_price * (1 + stopTick)
shortTake = strategy.position_avg_price * (1 - takeTick)
longTake = strategy.position_avg_price * (1 + takeTick)

plot(strategy.position_size > 0 and enablesl ? longStop : na, style=plot.style_linebr, color=color.red, linewidth=1, title="Long Fixed SL")
plot(strategy.position_size < 0 and enablesl ? shortStop : na, style=plot.style_linebr, color=color.red, linewidth=1, title="Short Fixed SL")
plot(strategy.position_size > 0 and enabletp ? longTake : na, style=plot.style_linebr, color=color.green, linewidth=1, title="Long Take Profit")
plot(strategy.position_size < 0 and enabletp ? shortTake : na, style=plot.style_linebr, color=color.green, linewidth=1, title="Short Take Profit")


// Alert messages
message_enterlong  = input("", title="Long Entry message")
message_entershort = input("", title="Short Entry message")
message_closelong = input("", title="Close Long message")
message_closeshort = input("", title="Close Short message")
    

//Strategy Execution

//Strategy Execution - Simple Line Cross
if (cci > ccisource and enablezero and enableentry and time_cond and timetobuy)
    strategy.entry("Long", strategy.long, alert_message = message_enterlong)
if (cci < ccisource and enablezero and enableentry and time_cond and timetobuy)
    strategy.entry("Short", strategy.short, alert_message = message_entershort)

if (simplecrossup and enablezero and enableconfirmation and time_cond and timetobuy)
    strategy.entry("Long", strategy.long, alert_message = message_enterlong)
if (simplecrossdown and enablezero and enableconfirmation and time_cond and timetobuy)
    strategy.entry("Short", strategy.short, alert_message = message_entershort)

//Strategy Execution - Upper and Lower Band Entry
if (uppercrossup and enablebands and time_cond and timetobuy)
    strategy.entry("Long", strategy.long, alert_message = message_enterlong)
if (lowercrossdown and enablebands and time_cond and timetobuy)
    strategy.entry("Short", strategy.short, alert_message = message_entershort)

//Strategy Execution - Upper and Lower Band Exit
if strategy.position_size > 0 and uppercrossdown and enablebands and time_cond and timetobuy
    strategy.close_all(alert_message = message_closelong)
if strategy.position_size < 0 and lowercrossup and enablebands and time_cond and timetobuy
    strategy.close_all(alert_message = message_closeshort)

//Strategy Execution - Upper and Lower Band Stops
if strategy.position_size > 0 and upperstop and enablebands and time_cond and timetobuy
    strategy.close_all(alert_message = message_closelong)
if strategy.position_size < 0 and lowerstop and enablebands and time_cond and timetobuy
    strategy.close_all(alert_message = message_closeshort)

//Strategy Execution - Close Trade At End Of Time Frame    
if strategy.position_size > 0 and timetoclose and enableclose and time_cond
    strategy.close_all(alert_message = message_closelong)
if strategy.position_size < 0 and timetoclose and enableclose and time_cond
    strategy.close_all(alert_message = message_closeshort)

//Strategy Execution - Stop Loss and Take Profit
if strategy.position_size > 0 and enablesl and time_cond
    strategy.exit(id="Close Long", stop=longStop, limit=longTake, alert_message = message_closelong)
if strategy.position_size < 0 and enablesl and time_cond
    strategy.exit(id="Close Short", stop=shortStop, limit=shortTake, alert_message = message_closeshort)
    
if strategy.position_size > 0 and enabletp and time_cond
    strategy.exit(id="Close Long", stop=longStop, limit=longTake, alert_message = message_closelong)
if strategy.position_size < 0 and enabletp and time_cond
    strategy.exit(id="Close Short", stop=shortStop, limit=shortTake, alert_message = message_closeshort)



مزید