
حکمت عملی فبونیکی ریٹیسمنٹ کی سطحوں پر مبنی ایک اعلی درجے کی رجحان کی پیروی اور ریورسل ٹریڈنگ سسٹم ہے۔ یہ متحرک طور پر قیمت کی بلندیوں اور کمیوں کی نشاندہی کرکے، سات کلیدی فبونیکی ریٹیسمنٹ لیولز (0%, 23.6%, 38.2%, 50%, 61.8%, 78.6% اور 100%) کا خود بخود حساب لگا کر اور ممکنہ حمایت اور مزاحمت کی سطحوں کی نشاندہی کرتا ہے۔ یہ نظام دو طرفہ تجارتی طریقہ کار اپناتا ہے، جو اوپر کے رجحان میں خریداری کے مواقع اور نیچے کے رجحان میں فروخت کے مختصر مواقع حاصل کر سکتا ہے۔
حکمت عملی کی بنیادی منطق درج ذیل کلیدی عناصر پر مبنی ہے:
یہ حکمت عملی کلاسک فبونیکی retracement تھیوری کو جدید مقداری تجارتی تکنیکوں کے ساتھ ملا کر ایک جامع تجارتی نظام تیار کرتی ہے۔ اس کا فائدہ یہ ہے کہ یہ خود بخود قیمت کی اہم سطحوں کی نشاندہی کر سکتا ہے اور واضح تجارتی سگنل فراہم کر سکتا ہے، لیکن حکمت عملی کی کارکردگی پر مارکیٹ کے ماحول کے اثرات پر توجہ دینا بھی ضروری ہے۔ تجویز کردہ اصلاحی ہدایات کے ذریعے، حکمت عملی کے استحکام اور منافع میں مزید بہتری کی توقع ہے۔
/*backtest
start: 2024-01-06 00:00:00
end: 2025-01-05 00:00:00
period: 3h
basePeriod: 3h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Fibonacci Retracement Strategy for Crypto", overlay=true)
// Input parameters
lookback = input.int(50, title="Lookback Period", minval=1)
plotLevels = input.bool(true, title="Plot Fibonacci Levels?")
compactLines = input.bool(true, title="Compact Fibonacci Lines?")
// Calculate highest high and lowest low for the lookback period
highestHigh = ta.highest(high, lookback)
lowestLow = ta.lowest(low, lookback)
// Fibonacci retracement levels
diff = highestHigh - lowestLow
level0 = highestHigh
level23_6 = highestHigh - diff * 0.236
level38_2 = highestHigh - diff * 0.382
level50 = highestHigh - diff * 0.5
level61_8 = highestHigh - diff * 0.618
level78_6 = highestHigh - diff * 0.786
level100 = lowestLow
// Plot Fibonacci levels (compact mode to make lines shorter)
// if plotLevels
// lineStyle = compactLines ? line.style_dashed : line.style_solid
// line.new(bar_index[lookback], level0, bar_index, level0, color=color.green, width=1, style=lineStyle)
// line.new(bar_index[lookback], level23_6, bar_index, level23_6, color=color.blue, width=1, style=lineStyle)
// line.new(bar_index[lookback], level38_2, bar_index, level38_2, color=color.blue, width=1, style=lineStyle)
// line.new(bar_index[lookback], level50, bar_index, level50, color=color.orange, width=1, style=lineStyle)
// line.new(bar_index[lookback], level61_8, bar_index, level61_8, color=color.red, width=1, style=lineStyle)
// line.new(bar_index[lookback], level78_6, bar_index, level78_6, color=color.red, width=1, style=lineStyle)
// line.new(bar_index[lookback], level100, bar_index, level100, color=color.green, width=1, style=lineStyle)
// Long trade: Buy when price crosses above 61.8% retracement
longCondition = ta.crossover(close, level61_8)
if longCondition
strategy.entry("Long", strategy.long, alert_message="Price bounced off Fibonacci level - Enter Long")
// Short trade: Sell when price crosses below 38.2% retracement
shortCondition = ta.crossunder(close, level38_2)
if shortCondition
strategy.entry("Short", strategy.short, alert_message="Price crossed below Fibonacci level - Enter Short")
// Exit conditions
exitLong = close >= level23_6
if exitLong
strategy.close("Long", alert_message="Price reached 23.6% Fibonacci level - Exit Long")
exitShort = close <= level78_6
if exitShort
strategy.close("Short", alert_message="Price reached 78.6% Fibonacci level - Exit Short")