
یہ حکمت عملی ایک خودکار تجارتی نظام ہے جو کثیر دورانیہ کے رجحانات کی پیروی اور خطرے کے انتظام کو جوڑتی ہے۔ یہ بنیادی طور پر 5 منٹ اور 1 منٹ کے دو ٹائم پیریڈ کے اشاریہ حرکت پذیر اوسط ((EMA) کے ذریعہ تجارت کے مواقع کی نشاندہی کرتا ہے ، جبکہ خطرے کو کنٹرول کرنے کے لئے مقررہ فیصد اسٹاپ نقصان اور منافع کی ترتیب کا اطلاق ہوتا ہے۔ یہ حکمت عملی خاص طور پر مختصر لائن تاجروں کے لئے موزوں ہے ، خاص طور پر ان تاجروں کے لئے جو رجحانات کی پیروی پر مرکوز ہیں۔
اس حکمت عملی کی بنیادی منطق دو ٹائم فریموں کے رجحانات پر مبنی ہے:
یہ ایک منظم ، منطقی اور واضح رجحانات کی پیروی کرنے والی حکمت عملی ہے۔ ملٹی سائیکل تجزیہ اور سخت رسک مینجمنٹ کے ساتھ مل کر ، حکمت عملی مارکیٹ کے رجحانات کو مؤثر طریقے سے پکڑنے کے قابل بناتی ہے جبکہ فنڈز کی حفاظت کرتی ہے۔ اگرچہ کچھ اصلاحات کی گنجائش موجود ہے ، لیکن حکمت عملی کا بنیادی فریم ورک مستحکم ہے ، جو بنیادی حکمت عملی کے طور پر مزید بہتری اور تخصیص کے لئے موزوں ہے۔
/*backtest
start: 2025-01-21 00:00:00
end: 2025-02-20 00:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Binance","currency":"DOGE_USDT"}]
*/
//@version=5
strategy("Scalping Strategy: 1-min Entries with 5-min 200 EMA Filter", overlay=true, initial_capital=10000, currency=currency.USD, default_qty_type=strategy.percent_of_equity, default_qty_value=5, calc_on_every_tick=true)
// --- Higher Timeframe Trend Filter ---
// Get the 200-period EMA on a 5-minute timeframe
ema200_5 = request.security(syminfo.tickerid, "5", ta.ema(close, 200), lookahead=barmerge.lookahead_on)
plot(ema200_5, color=color.purple, title="5-min 200 EMA")
// --- Local (1-Minute) Indicators ---
// On a 1-minute chart, calculate a 20-period EMA for entry triggers
ema20_1 = ta.ema(close, 20)
plot(ema20_1, color=color.yellow, title="1-min 20 EMA")
// --- Entry Conditions ---
// For long entries:
// - The overall trend is bullish: current close > 5-min 200 EMA
// - The 1-min candle closes and crosses above its 20 EMA
longCondition = (close > ema200_5) and ta.crossover(close, ema20_1)
// For short entries:
// - Overall bearish trend: current close < 5-min 200 EMA
// - 1-min candle crosses below its 20 EMA
shortCondition = (close < ema200_5) and ta.crossunder(close, ema20_1)
// --- Risk Management Settings ---
// For scalping, use a tight stop loss. Here we set risk at 0.5% of the entry price.
var float riskPerc = 0.005 // 0.5% risk per trade
// Declare global variables for stop loss and take profit so they can be used outside the if-blocks
var float longStop = na
var float longTP = na
var float shortStop = na
var float shortTP = na
// --- Trade Execution ---
if (longCondition)
entryPrice = close
// Stop loss for long: 0.5% below entry
longStop := entryPrice * (1 - riskPerc)
// Take profit: twice the risk distance (1:2 risk-reward)
longTP := entryPrice + 2 * (entryPrice - longStop)
strategy.entry("Long", strategy.long)
strategy.exit("Long Exit", from_entry="Long", stop=longStop, limit=longTP)
if (shortCondition)
entryPrice = close
// Stop loss for short: 0.5% above entry
shortStop := entryPrice * (1 + riskPerc)
// Take profit: twice the risk distance
shortTP := entryPrice - 2 * (shortStop - entryPrice)
strategy.entry("Short", strategy.short)
strategy.exit("Short Exit", from_entry="Short", stop=shortStop, limit=shortTP)
// --- Visual Debug Markers ---
// Plot a green triangle below bars when a long signal is generated
plotshape(longCondition, title="Long Signal", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.tiny)
// Plot a red triangle above bars when a short signal is generated
plotshape(shortCondition, title="Short Signal", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.tiny)