
یہ ایک ذہین ٹرینڈ ٹریکنگ حکمت عملی ہے جو کثیر تکنیکی اشارے کے کراس سگنل پر مبنی ہے۔ یہ حکمت عملی تین بڑے تکنیکی اشارے کو مربوط کرتی ہے ، جیسے کہ حرکت پذیر اوسط ((EMA) ، نسبتا strong مضبوط اشارے ((RSI) اور حرکت پذیر اوسط رجحانات کی مختلف قسم ((MACD) ، مارکیٹ کے رجحانات کی شناخت کے لئے کثیر جہتی سگنل کی تصدیق ، اور متحرک اسٹاپ نقصان کے ساتھ خطرے کے انتظام کے لئے۔ حکمت عملی کو مکمل طور پر خود کار طریقے سے ٹریڈنگ کے لئے ڈیزائن کیا گیا ہے ، جو خاص طور پر دن کے اندر تجارت کے لئے موزوں ہے۔
اس حکمت عملی کی بنیادی منطق تین درجوں پر مبنی ہے:
انٹری سگنل کی پیداوار مندرجہ ذیل شرائط کو پورا کرنے کے لئے ضروری ہے:
اس حکمت عملی میں فنڈز کا فیصد ہولڈنگ موڈ استعمال کیا گیا ہے ، جس میں ہر تجارت پر 10٪ اکاؤنٹ کا حق استعمال کیا جاتا ہے ، اور 2٪ اسٹاپ اور 1٪ اسٹاپ نقصان کے ساتھ خطرے پر قابو پایا جاتا ہے۔
رسک کنٹرول کی تجاویز:
یہ حکمت عملی متعدد تکنیکی اشارے کے ہم آہنگی کے ذریعے ایک نسبتا complete کامل رجحان ٹریکنگ سسٹم کی تشکیل کرتی ہے۔ حکمت عملی کے فوائد سگنل کی اعلی وشوسنییتا ، رسک مینجمنٹ کی تکمیل میں ہیں ، لیکن اس میں کچھ پسماندگی اور مارکیٹ کے ماحول پر انحصار بھی موجود ہے۔ تجویز کردہ اصلاح کی سمت کے ذریعہ ، حکمت عملی اس کی موافقت اور استحکام کو مزید بڑھا سکتی ہے۔ ریل اسٹیٹ ایپلی کیشنز میں ، مناسب پیمائش اور پیرامیٹرز کی اصلاح کی سفارش کی جاتی ہے ، اور مارکیٹ کی حقیقی صورتحال کے ساتھ مناسب ایڈجسٹمنٹ کی جاتی ہے۔
/*backtest
start: 2024-02-22 00:00:00
end: 2025-02-19 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/
// © egidiopalmieri
//@version=5
strategy("BTCUSD Intraday - AI-like Strategy", overlay=true, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=10, commission_type=strategy.commission.percent, commission_value=0.1)
// ==========================
// Risk and Strategy Parameters
// ==========================
takeProfitPerc = input.float(2.0, "Take Profit (%)", step=0.1) / 100.0 // Target profit: 2%
stopLossPerc = input.float(1.0, "Stop Loss (%)", step=0.1) / 100.0 // Stop loss: 1%
// ==========================
// Technical Indicators
// ==========================
emaShortPeriod = input.int(9, "Short EMA (period)", minval=1)
emaLongPeriod = input.int(21, "Long EMA (period)", minval=1)
emaShort = ta.ema(close, emaShortPeriod)
emaLong = ta.ema(close, emaLongPeriod)
// RSI Indicator
rsiPeriod = input.int(14, "RSI (period)", minval=1)
rsiValue = ta.rsi(close, rsiPeriod)
// MACD Indicator
[macdLine, signalLine, _] = ta.macd(close, 12, 26, 9)
// ==========================
// Entry Conditions
// ==========================
// LONG entry: short EMA crosses above long EMA, RSI not in overbought zone, MACD in bullish trend
longCondition = ta.crossover(emaShort, emaLong) and (rsiValue < 70) and (macdLine > signalLine)
// SHORT entry: short EMA crosses below long EMA, RSI not in oversold zone, MACD in bearish trend
shortCondition = ta.crossunder(emaShort, emaLong) and (rsiValue > 30) and (macdLine < signalLine)
// ==========================
// Signal Visualization
// ==========================
plotshape(longCondition, title="Long Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="Long")
plotshape(shortCondition, title="Short Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="Short")
// ==========================
// Entry Logic
// ==========================
if (longCondition)
strategy.entry("Long", strategy.long)
if (shortCondition)
strategy.entry("Short", strategy.short)
// ==========================
// Stop Loss and Take Profit Management
// The levels are calculated dynamically based on the average entry price
// ==========================
if strategy.position_size > 0
// For long positions
longSL = strategy.position_avg_price * (1 - stopLossPerc)
longTP = strategy.position_avg_price * (1 + takeProfitPerc)
strategy.exit("Exit Long", from_entry="Long", stop=longSL, limit=longTP)
if strategy.position_size < 0
// For short positions
shortSL = strategy.position_avg_price * (1 + stopLossPerc)
shortTP = strategy.position_avg_price * (1 - takeProfitPerc)
strategy.exit("Exit Short", from_entry="Short", stop=shortSL, limit=shortTP)
// ==========================
// Final Notes
// ==========================
// This script uses rules based on technical indicators to generate signals
// "AI-like". The integration of actual AI algorithms is not natively supported in PineScript.
// It is recommended to customize, test, and validate the strategy before using it in live trading.