यह ट्रेडिंग रणनीति 100 चक्र सूचकांक चलती औसत ((EMA100), शुद्ध अप्रयुक्त लाभ/हानि ((NUPL) और अपेक्षाकृत अप्रयुक्त लाभ के तीन संकेतकों पर आधारित है, जो ईएमए 100 के साथ कीमत के क्रॉसिंग और एनयूपीएल और अपेक्षाकृत अप्रयुक्त लाभ के लिए एक सकारात्मक नकारात्मक पर निर्णय करके एक ट्रेडिंग सिग्नल उत्पन्न करता है। जब ईएमए 100 और एनयूपीएल और अपेक्षाकृत अप्रयुक्त लाभ दोनों सही होते हैं तो एक मल्टी सिग्नल ट्रिगर किया जाता है; जब ईएमए 100 और एनयूपीएल और अपेक्षाकृत अप्रयुक्त लाभ दोनों नकारात्मक होते हैं तो एक शून्य सिग्नल ट्रिगर किया जाता है। यह रणनीति 10% की एक निश्चित स्थिति का उपयोग करती है और 10% की एक स्टॉप लॉस सेट करती है।
ट्रेडिंग रणनीति EMA100, NUPL और अपेक्षाकृत अप्रत्याशित लाभ के तीन संकेतकों के माध्यम से ट्रेडिंग सिग्नल उत्पन्न करती है, जिसमें तर्क स्पष्टता, जोखिम नियंत्रण और अनुकूलन क्षमता के फायदे शामिल हैं। इसके अलावा, झूठे संकेत, पिछड़ेपन और पैरामीटर अनुकूलन जैसे जोखिम भी हैं। भविष्य में पैरामीटर अनुकूलन, सिग्नल फ़िल्टरिंग, गतिशील स्थिति प्रबंधन और बहुआयामी संयोजन जैसे तरीकों से रणनीति को अनुकूलित और उन्नत किया जा सकता है।
/*backtest
start: 2023-06-11 00:00:00
end: 2024-06-16 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Scalping Strategy with EMA 100, NUPL, and Relative Unrealized Profit", overlay=true)
// Input for EMA period
emaPeriod = input.int(100, title="EMA Period", minval=1)
ema100 = ta.ema(close, emaPeriod)
plot(ema100, color=color.blue, title="EMA 100")
// Placeholder function for NUPL (Net Unrealized Profit/Loss)
// Replace this with actual NUPL data or calculation
NUPL = close * 0.0001 // Dummy calculation
// Placeholder function for relative unrealized profit
// Replace this with actual relative unrealized profit data or calculation
relativeUnrealizedProfit = close * 0.0001 // Dummy calculation
// Define conditions for long and short entries
longCondition = ta.crossover(close, ema100) and NUPL > 0 and relativeUnrealizedProfit > 0
shortCondition = ta.crossunder(close, ema100) and NUPL < 0 and relativeUnrealizedProfit < 0
// Plot buy and sell signals on the chart
plotshape(series=longCondition, location=location.belowbar, color=color.green, style=shape.labelup, title="Buy Signal")
plotshape(series=shortCondition, location=location.abovebar, color=color.red, style=shape.labeldown, title="Sell Signal")
// Calculate stop loss levels
longStopLoss = close * 0.90
shortStopLoss = close * 1.10
// Strategy entry and exit rules
if (longCondition)
strategy.entry("Long", strategy.long, stop=longStopLoss)
if (shortCondition)
strategy.entry("Short", strategy.short, stop=shortStopLoss)
// Set stop loss levels for active positions
if (strategy.position_size > 0)
strategy.exit("Exit Long", "Long", stop=longStopLoss)
if (strategy.position_size < 0)
strategy.exit("Exit Short", "Short", stop=shortStopLoss)
// Alerts for long and short entries
alertcondition(longCondition, title="Long Entry Alert", message="Long entry signal based on EMA 100, NUPL, and relative unrealized profit")
alertcondition(shortCondition, title="Short Entry Alert", message="Short entry signal based on EMA 100, NUPL, and relative unrealized profit")
// Visualize the entry conditions
plotshape(series=longCondition, location=location.belowbar, color=color.blue, style=shape.cross, title="Long Condition")
plotshape(series=shortCondition, location=location.abovebar, color=color.red, style=shape.cross, title="Short Condition")