
इस रणनीति में प्रवेश और बाहर निकलने के संकेत के रूप में डेली लाइन के वीडब्ल्यूएपी का उपयोग किया जाता है। जब वीडब्ल्यूएपी को बंद करने की कीमत पर ट्रिगर किया जाता है, तो स्टॉप लॉस को वीडब्ल्यूएपी के नीचे पहले केके लाइन के निचले बिंदु पर सेट किया जाता है, लक्ष्य मूल्य को खोलने की कीमत से 3 अंक ऊपर सेट किया जाता है; जब वीडब्ल्यूएपी को बंद करने की कीमत को बंद करने के लिए ट्रिगर किया जाता है, तो स्टॉप लॉस को वीडब्ल्यूएपी के ऊपर पहले केके लाइन के उच्च बिंदु पर सेट किया जाता है, लक्ष्य मूल्य को खोलने की कीमत से 3 अंक नीचे सेट किया जाता है। इस रणनीति में कोई बाहर निकलने की शर्त शामिल नहीं है, और व्यापार तब तक होता है जब तक कि रिवर्स सिग्नल नहीं होता है।
गतिशील स्टॉपलॉस और फिक्स्ड पॉइंट स्टॉपलॉस का उपयोग करते हुए, क्रॉस-साइकिल वीडब्ल्यूपीएपी डेटा के माध्यम से रुझानों का आकलन करें, जिससे रुझान की स्थिति को प्रभावी ढंग से पकड़ने, वापसी के जोखिम को नियंत्रित करने और समय पर मुनाफे को लॉक करने में मदद मिल सके।
यह रणनीति ट्रेंड निर्णय और सिग्नल ट्रिगर के लिए क्रॉस-साइक्ल VWAP डेटा का उपयोग करती है, जबकि गतिशील स्टॉप और फिक्स्ड पॉइंट स्टॉप का उपयोग करके जोखिम को नियंत्रित करती है और मुनाफे को लॉक करती है। यह एक सरल और प्रभावी मात्रात्मक व्यापार रणनीति है। रुझान फ़िल्टरिंग, गतिशील स्टॉप, स्थिति प्रबंधन और ट्रेडिंग समय चयन जैसे पहलुओं का अनुकूलन करके रणनीति की स्थिरता और आय क्षमता को और बढ़ाया जा सकता है। लेकिन वास्तविक अनुप्रयोगों में, बाजार की विशेषताओं, व्यापार लागत और पैरामीटर अनुकूलन जैसे कारकों पर ध्यान देने की आवश्यकता है ताकि बेहतर रणनीति प्रदर्शन हो सके।
/*backtest
start: 2024-03-06 00:00:00
end: 2024-03-07 00:00:00
period: 45m
basePeriod: 5m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy('Pine Script Tutorial Example Strategy 1', overlay=true, initial_capital=1000, default_qty_value=100, default_qty_type=strategy.percent_of_equity)
// fastEMA = ta.ema(close, 24)
// slowEMA = ta.ema(close, 200)
// Higher Time Frame
float sl = na
float tgt = na
posSize = 1
vwap_1d = request.security(syminfo.tickerid, "1D", ta.vwap(close))
// plot(vwap_1d)
// To avoid differences on historical and realtime bars, you can use this technique, which only returns a value from the higher timeframe on the bar after it completes:
// indexHighTF = barstate.isrealtime ? 1 : 0
// indexCurrTF = barstate.isrealtime ? 0 : 1
// nonRepaintingVWAP = request.security(syminfo.tickerid, "1D", close[indexHighTF])[indexCurrTF]
// plot(nonRepaintingVWAP, "Non-repainting VWAP")
enterLong = ta.crossover(close, vwap_1d)
exitLong = ta.crossunder(close, vwap_1d)
enterShort = ta.crossunder(close, vwap_1d)
exitShort = ta.crossover(close, vwap_1d)
if enterLong
sl := low[1]>vwap_1d ?low[1]:vwap_1d
tgt:=close+3
strategy.entry("EL", strategy.long, qty=posSize)
strategy.exit('exitEL', 'EL', stop=sl, limit=tgt)
if enterShort
sl := high[1]<vwap_1d ?high[1]:vwap_1d
tgt := close-3
strategy.entry("ES", strategy.short, qty=posSize)
strategy.exit('exitES', 'ES', stop=sl, limit=tgt)
// if exitLong
// strategy.close("EL")
// if exitShort
// strategy.close("ES")
// goLongCondition1 = ta.crossover(close, vwap_1d)
// timePeriod = time >= timestamp(syminfo.timezone, 2021, 01, 01, 0, 0)
// notInTrade = strategy.position_size <= 0
// if goLongCondition1 and timePeriod and notInTrade
// stopLoss = low[1]
// takeProfit = close+3
// strategy.entry('long', strategy.long)
// strategy.exit('exit', 'long', stop=stopLoss, limit=takeProfit)
plot(close, color=color.new(#00c510, 0))
plot(vwap_1d, color=color.new(#f05619, 0))
plot(sl, color=color.new(#fbff00, 0))
plot(tgt, color=color.new(#00e1ff, 0))