
यह रणनीति एक ट्रेंड ट्रैकिंग ट्रेडिंग सिस्टम है जिसमें MACD ((मूविंग एवरेज कोविजेंड स्प्रैड) और RSI ((रिलेटिवली स्ट्रॉन्ग इंडिकेटर) शामिल हैं। यह रणनीति 5 मिनट के समय चक्र पर चलती है और ट्रेडिंग सिग्नल उत्पन्न करने के लिए MACD और सिग्नल लाइन के क्रॉसिंग और RSI के ओवरबॉय ओवरसोल्ड स्तर का विश्लेषण करती है। साथ ही प्रतिशत-आधारित स्टॉप और रिटर्न-क्लोजिंग तंत्र को जोखिम प्रबंधन के लिए एकीकृत किया गया है।
यह रणनीति मुख्य रूप से निम्नलिखित मूल तर्क पर आधारित हैः
इस रणनीति में MACD और RSI के लाभों को मिलाकर एक ट्रेडिंग सिस्टम का निर्माण किया गया है जिसमें ट्रेंड ट्रैकिंग और गतिशीलता दोनों विशेषताएं हैं। एक अच्छी तरह से विकसित जोखिम नियंत्रण तंत्र और एक स्पष्ट ट्रेडिंग तर्क इसे अच्छी व्यावहारिकता देता है। अनुशंसित अनुकूलन दिशा के माध्यम से, रणनीति में और सुधार करने के लिए जगह है। जब इसे वास्तविक दुनिया में लागू किया जाता है, तो यह अनुशंसा की जाती है कि पहले पर्याप्त प्रतिक्रिया परीक्षण किया जाए और पैरामीटर को विशिष्ट बाजार विशेषताओं के अनुसार उचित रूप से समायोजित किया जाए।
/*backtest
start: 2019-12-23 08:00:00
end: 2024-12-11 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
//@version=5
strategy("MACD + RSI Basit Strateji", overlay=true, initial_capital=1000, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// İndikatör parametreleri
fastLength = input(12, "MACD Fast Length")
slowLength = input(26, "MACD Slow Length")
signalLength = input(9, "MACD Signal Length")
rsiLength = input(14, "RSI Period")
rsiOversold = input(45, "RSI Oversold Level")
rsiOverbought = input(55, "RSI Overbought Level")
// Stop Loss ve Take Profit ekledim
stopLoss = input(1.2, "Stop Loss (%)")
takeProfit = input(2.4, "Take Profit (%)")
// MACD hesaplama
[macdLine, signalLine, histLine] = ta.macd(close, fastLength, slowLength, signalLength)
// RSI hesaplama
rsiValue = ta.rsi(close, rsiLength)
// EMA trend filtresi
emaValue = ta.ema(close, 10)
// Alım sinyali koşulları - sadece MACD ve RSI kullanalım
longCondition = macdLine > signalLine and rsiValue < rsiOversold
// Satım sinyali koşulları
shortCondition = macdLine < signalLine and rsiValue > rsiOverbought
// Pozisyon yönetimi - Stop Loss ve Take Profit ekledim
if (longCondition)
strategy.entry("Long", strategy.long)
strategy.exit("TP/SL", "Long",
profit = close * takeProfit / 100,
loss = close * stopLoss / 100)
if (shortCondition)
strategy.close("Long")
// Grafik göstergeleri
plotshape(longCondition, title="Alım",
style=shape.triangleup,
location=location.belowbar,
color=color.green,
size=size.large,
text="AL")
plotshape(shortCondition, title="Satım",
style=shape.triangledown,
location=location.abovebar,
color=color.red,
size=size.large,
text="SAT")
// İndikatörleri göster
plot(rsiValue, "RSI", color=color.purple)
hline(rsiOversold, "Oversold", color=color.gray)
hline(rsiOverbought, "Overbought", color=color.gray)