
یہ حکمت عملی ایک پیچیدہ تجارتی نظام ہے جس میں رجحانات کی پیروی اور وقفے وقفے سے تجارت شامل ہے ، مارکیٹ کی حالت کی شناخت کے لئے Ichimoku کلاؤڈ گراف کے ذریعہ ، MACD متحرک تصدیق اور RSI اووربائ اوور سیل اشارے کے ساتھ مل کر ، ATR کا استعمال کرتے ہوئے متحرک اسٹاپ نقصان کا انتظام کرنے کے لئے۔ یہ حکمت عملی رجحانات کی مارکیٹ میں رجحاناتی مواقع کو پکڑنے ، اتار چڑھاؤ کی مارکیٹ میں الٹ کے مواقع تلاش کرنے کے قابل ہے ، اور اس میں مضبوط موافقت اور لچک ہے۔
اس حکمت عملی میں سگنل کی تصدیق کے لیے کئی سطحوں کا استعمال کیا گیا ہے:
یہ حکمت عملی ایک جامع تجارتی نظام ہے جو معقول ، منطقی طور پر ڈیزائن کیا گیا ہے ، جس میں متعدد اشارے کے ہم آہنگ استعمال کے ذریعہ ، مارکیٹ کی حالت کی ذہین شناخت اور تجارتی مواقع کی درست گرفت حاصل کی گئی ہے۔ اگرچہ کم وقت کے دورانیے میں کچھ پریشانیوں کا سامنا کرنا پڑتا ہے ، لیکن اعلی وقت کے دورانیے میں بہترین کارکردگی کا مظاہرہ کیا جاتا ہے ، جیسے دن کی لکیر۔ یہ مشورہ دیا جاتا ہے کہ تاجر جب حقیقی وقت میں استعمال کریں تو ، دن کی لکیر کی سطح کے اشارے پر توجہ دیں ، اور اپنے خطرے کی برداشت کی صلاحیت کے مطابق مناسب طریقے سے پیرامیٹرز کو ایڈجسٹ کریں۔ مسلسل اصلاح اور ایڈجسٹمنٹ کے ذریعہ ، اس حکمت عملی میں ٹریڈنگ فراہم کرنے والوں کے لئے مستحکم منافع کے مواقع کی امید ہے۔
/*backtest
start: 2024-08-01 00:00:00
end: 2025-02-18 08:00:00
period: 2d
basePeriod: 2d
exchanges: [{"eid":"Binance","currency":"ETH_USDT"}]
*/
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © FIWB
//@version=6
strategy("Refined Ichimoku with MACD and RSI Strategy", overlay=true)
// Inputs for Ichimoku Cloud
conversionLength = input.int(9, title="Conversion Line Length", group="Ichimoku Settings")
baseLength = input.int(26, title="Base Line Length", group="Ichimoku Settings")
laggingSpanLength = input.int(52, title="Lagging Span Length", group="Ichimoku Settings")
displacement = input.int(26, title="Displacement", group="Ichimoku Settings")
// Inputs for MACD
macdFastLength = input.int(12, title="MACD Fast Length", group="MACD Settings")
macdSlowLength = input.int(26, title="MACD Slow Length", group="MACD Settings")
macdSignalLength = input.int(9, title="MACD Signal Length", group="MACD Settings")
// Inputs for RSI/Stochastic RSI
rsiLength = input.int(14, title="RSI Length", group="Momentum Indicators")
stochRsiLength = input.int(14, title="Stochastic RSI Length", group="Momentum Indicators")
stochRsiK = input.int(3, title="%K Smoothing", group="Momentum Indicators")
stochRsiD = input.int(3, title="%D Smoothing", group="Momentum Indicators")
// Inputs for ATR
atrLength = input.int(14, title="ATR Length", group="Risk Management")
atrMultiplier = input.float(2.0, title="ATR Multiplier", group="Risk Management")
// Ichimoku Cloud Calculation
conversionLine = (ta.highest(high, conversionLength) + ta.lowest(low, conversionLength)) / 2
baseLine = (ta.highest(high, baseLength) + ta.lowest(low, baseLength)) / 2
leadingSpanA = (conversionLine + baseLine) / 2
leadingSpanB = (ta.highest(high, laggingSpanLength) + ta.lowest(low, laggingSpanLength)) / 2
// Market Regime Detection Using Ichimoku Cloud
priceAboveCloud = close >= leadingSpanA and close >= leadingSpanB
priceBelowCloud = close <= leadingSpanA and close <= leadingSpanB
priceNearCloud = close > leadingSpanB and close < leadingSpanA
trendingMarket = priceAboveCloud or priceBelowCloud
rangeBoundMarket = priceNearCloud
// MACD Calculation
macdLine = ta.ema(close, macdFastLength) - ta.ema(close, macdSlowLength)
macdSignalLine = ta.sma(macdLine, macdSignalLength)
macdHistogram = macdLine - macdSignalLine
// RSI Calculation
rsiValue = ta.rsi(close, rsiLength)
// Stochastic RSI Calculation
stochRsiKValue = ta.sma(ta.stoch(close, high, low, stochRsiLength), stochRsiK)
stochRsiDValue = ta.sma(stochRsiKValue, stochRsiD)
// Entry Conditions with Tightened Filters
trendLongCondition = trendingMarket and priceAboveCloud and rsiValue > 55 and macdHistogram > 0 and stochRsiKValue > stochRsiDValue
trendShortCondition = trendingMarket and priceBelowCloud and rsiValue < 45 and macdHistogram < 0 and stochRsiKValue < stochRsiDValue
rangeLongCondition = rangeBoundMarket and rsiValue < 30 and stochRsiKValue < 20
rangeShortCondition = rangeBoundMarket and rsiValue > 70 and stochRsiKValue > 80
// Risk Management: Stop-Loss Based on ATR
atrValue = ta.atr(atrLength)
longStopLoss = low - atrMultiplier * atrValue
shortStopLoss = high + atrMultiplier * atrValue
// Strategy Execution: Entries and Exits
if trendLongCondition
strategy.entry("Trend Long", strategy.long)
strategy.exit("Exit Trend Long", from_entry="Trend Long", stop=longStopLoss)
if trendShortCondition
strategy.entry("Trend Short", strategy.short)
strategy.exit("Exit Trend Short", from_entry="Trend Short", stop=shortStopLoss)
if rangeLongCondition
strategy.entry("Range Long", strategy.long)
strategy.exit("Exit Range Long", from_entry="Range Long", stop=longStopLoss)
if rangeShortCondition
strategy.entry("Range Short", strategy.short)
strategy.exit("Exit Range Short", from_entry="Range Short", stop=shortStopLoss)
// Visualization: Highlight Market Regimes on Chart Background
bgcolor(trendingMarket ? color.new(color.green, 90) : na)
bgcolor(rangeBoundMarket ? color.new(color.red, 90) : na)
// Plot Ichimoku Cloud for Visualization
plot(leadingSpanA, color=color.new(color.green, 80), title="Leading Span A")
plot(leadingSpanB, color=color.new(color.red, 80), title="Leading Span B")