
یہ حکمت عملی ایک مقداری تجارتی حکمت عملی ہے جو نسبتا strong مضبوط اشارے ((RSI) اور متحرک oscillator ((AO) کے ہم آہنگی پر مبنی ہے۔ حکمت عملی بنیادی طور پر ممکنہ زیادہ کرنے کے مواقع کی نشاندہی کرتی ہے جس میں RSI 50 کی حد سے تجاوز کرنے اور AO کے منفی علاقے میں ہونے کے ہم آہنگی کے اشارے پر گرفت ہے۔ حکمت عملی فیصد اسٹاپ نقصان کے طریقہ کار کو خطرے کا انتظام کرنے کے لئے استعمال کرتی ہے ، اور اکاؤنٹ میں 10٪ فنڈز کو بطور ڈیفالٹ تجارت کرتی ہے۔
اس حکمت عملی کا بنیادی منطق دو تکنیکی اشارے پر مبنی ہے:
یہ آر ایس آئی اور اے او اشارے کے ساتھ مل کر ایک رجحان سے باخبر رہنے کی حکمت عملی ہے ، جس میں اوور سیل علاقوں کے الٹ پلٹ سگنل کو پکڑ کر زیادہ تجارت کی جاتی ہے۔ حکمت عملی کا ڈیزائن معقول ہے ، خطرہ قابو میں ہے ، لیکن اس میں اصلاح کی گنجائش موجود ہے۔ اس سے پہلے کہ اس کا استعمال عملی طور پر کیا جائے ، تاجروں کو مشورہ دیا جاتا ہے کہ وہ کافی تاریخی ریٹرننگ کریں ، اور پیرامیٹرز کی ترتیبات کو حقیقی مارکیٹ کی صورتحال کے مطابق ایڈجسٹ کریں۔ حکمت عملی کو خطرہ برداشت کرنے کے لئے موزوں ہے ، اور تکنیکی تجزیہ کے بارے میں کچھ سمجھنے والے تاجروں کے لئے استعمال کیا جاتا ہے۔
/*backtest
start: 2024-10-01 00:00:00
end: 2024-10-31 23:59:59
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy(title="🐂 BUY Only - RSI Crossing 50 + AO Negative", shorttitle="🐂 AO<0 RSI+50 Strategy", overlay=true)
// -----------------------------
// --- User Inputs ---
// -----------------------------
// RSI Settings
rsiPeriod = input.int(title="RSI Period", defval=14, minval=1)
// AO Settings
aoShortPeriod = input.int(title="AO Short Period", defval=5, minval=1)
aoLongPeriod = input.int(title="AO Long Period", defval=34, minval=1)
// Strategy Settings
takeProfitPerc = input.float(title="Take Profit (%)", defval=2.0, minval=0.0, step=0.1)
stopLossPerc = input.float(title="Stop Loss (%)", defval=1.0, minval=0.0, step=0.1)
// -----------------------------
// --- Awesome Oscillator (AO) Calculation ---
// -----------------------------
// Calculate the Awesome Oscillator
ao = ta.sma(hl2, aoShortPeriod) - ta.sma(hl2, aoLongPeriod)
// Detect AO Crossing Zero
aoCrossOverZero = ta.crossover(ao, 0)
aoCrossUnderZero = ta.crossunder(ao, 0)
// -----------------------------
// --- Relative Strength Index (RSI) Calculation ---
// -----------------------------
// Calculate RSI
rsiValue = ta.rsi(close, rsiPeriod)
// Detect RSI Crossing 50
rsiCrossOver50 = ta.crossover(rsiValue, 50)
rsiCrossUnder50 = ta.crossunder(rsiValue, 50)
// -----------------------------
// --- Plotting Arrows and Labels ---
// -----------------------------
// Plot AO Cross Over Arrow (AO+)
plotshape(series=aoCrossOverZero,
location=location.belowbar,
color=color.green,
style=shape.labelup,
title="AO Crosses Above Zero",
text="AO+",
textcolor=color.white,
size=size.small)
// Plot AO Cross Under Arrow (AO-)
plotshape(series=aoCrossUnderZero,
location=location.abovebar,
color=color.red,
style=shape.labeldown,
title="AO Crosses Below Zero",
text="AO-",
textcolor=color.white,
size=size.small)
// Plot RSI Cross Over Arrow (RSI Up)
plotshape(series=rsiCrossOver50,
location=location.belowbar,
color=color.blue,
style=shape.labelup,
title="RSI Crosses Above 50",
text="RSI Up",
textcolor=color.white,
size=size.small)
// Plot RSI Cross Under Arrow (RSI Down)
plotshape(series=rsiCrossUnder50,
location=location.abovebar,
color=color.orange,
style=shape.labeldown,
title="RSI Crosses Below 50",
text="RSI Down",
textcolor=color.white,
size=size.small)
// -----------------------------
// --- Buy Signal Condition ---
// -----------------------------
// Define Buy Signal: AO is negative and previous bar's RSI > 50
buySignal = (ao < 0) and (rsiValue[1] > 50)
// Plot Buy Signal
plotshape(series=buySignal,
location=location.belowbar,
color=color.lime,
style=shape.triangleup,
title="Buy Signal",
text="BUY",
textcolor=color.black,
size=size.small)
// -----------------------------
// --- Strategy Execution ---
// -----------------------------
// Entry Condition
if buySignal
strategy.entry("Long", strategy.long)
// Exit Conditions
// Calculate Stop Loss and Take Profit Prices
if strategy.position_size > 0
// Entry price
entryPrice = strategy.position_avg_price
// Stop Loss and Take Profit Levels
stopLevel = entryPrice * (1 - stopLossPerc / 100)
takeProfitLevel = entryPrice * (1 + takeProfitPerc / 100)
// Submit Stop Loss and Take Profit Orders
strategy.exit("Exit Long", from_entry="Long", stop=stopLevel, limit=takeProfitLevel)