यह रणनीति एकल-समानता रेखा और ब्रिन बैंड संकेतक पर आधारित है, जब कीमत ब्रिन बैंड को पार करती है, तो खरीद या बेचने के लिए कार्रवाई की जाती है। साथ ही, एक समानता रेखा की दिशा का आकलन करने के लिए, केवल तभी खरीदा जाता है जब औसत रेखा ऊपर जाती है, और जब औसत रेखा नीचे जाती है, तो बेच दिया जाता है।
इस रणनीति को मुख्य रूप से निम्नलिखित मापदंडों के आधार पर आंका गया हैः
ये हैं ट्रेडिंग के संकेत
इस प्रकार, ट्रेंड और ब्रेकआउट के संयोजन से ट्रेडिंग सिग्नल को अधिक विश्वसनीय बनाया जाता है और झूठे ब्रेकआउट से बचा जाता है।
यह रणनीति सामान्य रूप से सरल और व्यावहारिक है और अधिकांश लोगों के लिए उपयुक्त है। कुछ अनुकूलन समायोजनों के साथ, रणनीति को अधिक कठोर बनाया जा सकता है और अधिक बाजार स्थितियों के लिए अनुकूलित किया जा सकता है।
/*backtest
start: 2023-12-14 00:00:00
end: 2023-12-18 19:00:00
period: 1m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=2
strategy(title="single sma cross", shorttitle="single sma cross",default_qty_type = strategy.percent_of_equity, default_qty_value = 100,overlay=true,currency="USD")
s=input(title="s",defval=90)
p=input(title="p",type=float,defval=.9,step=.1)
sa=sma(close,s)
plot(sa,color=red,linewidth=3)
band=stdev(close,s)*p
plot(band+sa,color=lime,title="")
plot(-band+sa,color=lime,title="")
// ===Strategy Orders============================================= ========
inpTakeProfit = input(defval = 0, title = "Take Profit", minval = 0)
inpStopLoss = input(defval = 0, title = "Stop Loss", minval = 0)
inpTrailStop = input(defval = 0, title = "Trailing Stop Loss", minval = 0)
inpTrailOffset = input(defval = 0, title = "Trailing Stop Loss Offset", minval = 0)
useTakeProfit = inpTakeProfit >= 1 ? inpTakeProfit : na
useStopLoss = inpStopLoss >= 1 ? inpStopLoss : na
useTrailStop = inpTrailStop >= 1 ? inpTrailStop : na
useTrailOffset = inpTrailOffset >= 1 ? inpTrailOffset : na
longCondition = crossover(close,sa+band) and rising(sa,5)
shortCondition = crossunder(close,sa-band) and falling(sa,5)
crossmid = cross(close,sa)
strategy.entry(id = "Long", long=true, when = longCondition)
strategy.close(id = "Long", when = shortCondition)
strategy.entry(id = "Short", long=false, when = shortCondition)
strategy.close(id = "Short", when = longCondition)
strategy.exit("Exit Long", from_entry = "Long", profit = useTakeProfit, loss = useStopLoss, trail_points = useTrailStop, trail_offset = useTrailOffset, when=crossmid)
strategy.exit("Exit Short", from_entry = "Short", profit = useTakeProfit, loss = useStopLoss, trail_points = useTrailStop, trail_offset = useTrailOffset, when=crossmid)