यह रणनीति स्टोचैस्टिक ऑस्सिलेटर सूचक के आधार पर बाजार की ओवरबॉय ओवरसोल स्थिति का आकलन करती है, जो लचीले नुकसान के सिद्धांत के साथ मिलकर अल्पकालिक व्यापार करती है। स्टोचैस्टिक सूचक पर गोल्ड फोर्क के दौरान अधिक करें, मृत फोर्क के दौरान खाली करें, और पूर्व-अवधि के केंद्र बिंदु के आधार पर लचीले स्टॉप को सेट करें, जबकि लाभप्रदता की गारंटी देते हुए जोखिम को नियंत्रित करें।
स्टोकेस्टिक ऑस्सिलेटर सूचक में% K लाइन और% D लाइन शामिल हैं। जब% K लाइन नीचे से ऊपर की ओर% D लाइन को तोड़ती है, तो गोल्डन फोर्क सिग्नल के लिए, अधिक करें; जब% K लाइन ऊपर से नीचे की ओर% D लाइन को तोड़ती है, तो डेड फोर्क सिग्नल के लिए, खाली करें। इस रणनीति का उपयोग स्टोकेस्टिक सूचक के आधार पर गोल्डन फोर्क डेड फोर्क सिग्नल का आकलन करने के लिए किया जाता है।
विशेष रूप से, स्टोचैस्टिक सूचकांक के गोल्ड फोर्क पर, यदि% K लाइन 80 से कम है (अधिक नहीं खरीदा गया है), तो अधिक करें; स्टोचैस्टिक सूचकांक के डेड फोर्क पर, यदि% K लाइन 20 से अधिक है (अधिक नहीं बेचा गया है), तो शून्य करें।
GoLong=crossover(k,d) and k<80
GoShort=crossunder(k,d) and k>20
इस रणनीति में लचीले स्टॉप का उपयोग किया जाता है, जो पूर्व-अवधि के केंद्र बिंदु के आधार पर स्टॉप मूल्य निर्धारित करता है, कोड निम्नानुसार हैः
piv_high = pivothigh(high,1,1)
piv_low = pivotlow(low,1,1)
stoploss_long=valuewhen(piv_low,piv_low,0)
stoploss_short=valuewhen(piv_high,piv_high,0)
केंद्र बिंदु एक महत्वपूर्ण समर्थन प्रतिरोध का प्रतिनिधित्व करता है, और यदि कीमत केंद्र बिंदु को तोड़ती है, तो यह स्थिति से बाहर निकलती है, जिससे स्टॉप-प्रिंट की लोचदार झुकाव को केंद्र बिंदु के परिवर्तन के साथ पालन करना पड़ता है।
इसके अलावा, स्टॉप-लॉस मूल्य वर्तमान अवधि के लिए न्यूनतम और अधिकतम मूल्य को भी ध्यान में रखता है, जो स्टॉप-लॉस स्थिति को और अनुकूलित करता है, जैसा कि निम्न कोड में दिखाया गया हैः
if GoLong
stoploss_long := low<pl ? low : pl
if GoShort
stoploss_short := high>ph ? high : ph
स्टोचैस्टिक सूचकांक का उपयोग करके बाजार के ओवरबॉय और ओवरसोल की स्थिति का आकलन करें, ताकि ऊंचाई और गिरावट का पीछा न किया जा सके;
लोचदार स्टॉप सिद्धांत का उपयोग करें, जो बाजार में परिवर्तन के अनुसार स्टॉप स्थिति का अनुकूलन कर सकता है;
यह भी कहा गया है कि इस तरह के कदमों के लिए, “असंतुलन” को “असंतुलन” के रूप में जाना जाता है।
स्टॉप लॉस ऑप्टिमाइज़ेशन के लिए सबसे कम न्यूनतम मूल्य पर विचार करें, जिससे स्टॉप लॉस अधिक सटीक हो सके।
स्टोचैस्टिक सूचकांक में गलत संकेतों का खतरा
स्टॉप लॉस को तोड़ने से नुकसान बढ़ने का जोखिम
बार-बार लेन-देन से लेन-देन शुल्क में वृद्धि का जोखिम
अनुकूलित स्टॉप-लॉस रणनीतियाँ, जैसे कि चांडेलियर एग्जिट, मूव स्टॉप, ऑसिलेशन स्टॉप आदि
स्टोकेस्टिक सूचक के झूठे संकेतों से बचने के लिए अन्य संकेतकों के साथ प्रवेश की स्थिति को अनुकूलित करें
उच्च लाभप्रदता प्राप्त करने के लिए गतिशील और कंपन स्टॉप जैसे स्टॉप को अनुकूलित करने के तरीके
स्थान प्रबंधन जोड़ें, जैसे कि एक निश्चित राशि, एक निश्चित निवेश अनुपात, आदि, एकल जोखिम को नियंत्रित करें
अनुकूलन पैरामीटर सेट करें, जैसे कि K, D अवधि, चिकनाई चक्र, आदि, विभिन्न बाजारों के लिए समायोजन पैरामीटर
इस रणनीति का उपयोग स्टोचैस्टिक सूचक के माध्यम से ओवरबॉय ओवरसोल्ड स्थिति का आकलन करने के लिए किया जाता है, और लचीला स्टॉप-लॉस विधि का उपयोग करके जोखिम प्रबंधन किया जाता है। इस रणनीति में उच्च-बचाव, प्रभावी स्टॉप-लॉस आदि से बचने के फायदे हैं, लेकिन कुछ झूठे सिग्नल का जोखिम भी है। भविष्य में प्रवेश की स्थिति, स्टॉप-लॉस रणनीति, स्टॉप-लॉस विधि, जोखिम प्रबंधन आदि के अनुकूलन के माध्यम से इस रणनीति को और बेहतर बनाया जा सकता है।
/*backtest
start: 2023-08-28 00:00:00
end: 2023-09-27 00:00:00
period: 2h
basePeriod: 15m
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/
// © Peter_O
//@version=4
//strategy(title="TradingView Alerts to MT4 MT5 example with cancelling pending orders", commission_type=strategy.commission.cash_per_order, commission_value=0.00003, overlay=true, default_qty_value=100000, initial_capital=1000)
// This script was created for educational purposes only.
// It is showing how to create pending orders and cancel them
// Together with syntax to send these events through TradingView alerts system
// All the way to brokers for execution
TakeProfitLevel=input(400)
// **** Entries logic **** {
periodK = 13 //input(13, title="K", minval=1)
periodD = 3 //input(3, title="D", minval=1)
smoothK = 4 //input(4, title="Smooth", minval=1)
k = sma(stoch(close, high, low, periodK), smoothK)
d = sma(k, periodD)
// plot(k, title="%K", color=color.blue)
// plot(d, title="%D", color=color.orange)
// h0 = hline(80)
// h1 = hline(20)
// fill(h0, h1, color=color.purple, transp=75)
GoLong=crossover(k,d) and k<80
GoShort=crossunder(k,d) and k>20
// } End of entries logic
// **** Pivot-points and stop-loss logic **** {
piv_high = pivothigh(high,1,1)
piv_low = pivotlow(low,1,1)
var float stoploss_long=low
var float stoploss_short=high
pl=valuewhen(piv_low,piv_low,0)
ph=valuewhen(piv_high,piv_high,0)
if GoLong
stoploss_long := low<pl ? low : pl
if GoShort
stoploss_short := high>ph ? high : ph
plot(stoploss_long, color=color.lime, title="stoploss_long")
plot(stoploss_short, color=color.red, title="stoploss_short")
// } End of Pivot-points and stop-loss logic
CancelLong=crossunder(low,stoploss_long) and strategy.position_size[1]<=0 and strategy.position_size<=0
CancelShort=crossover(high,stoploss_short) and strategy.position_size[1]>=0 and strategy.position_size>=0
entry_distance=input(10, title="Entry distance for stop orders")
plotshape(CancelLong ? stoploss_long[1]-10*syminfo.mintick : na, location=location.absolute, style=shape.labelup, color=color.gray, textcolor=color.white, text="cancel\nlong", size=size.tiny)
plotshape(CancelShort ? stoploss_short[1]+10*syminfo.mintick : na, location=location.absolute, style=shape.labeldown, color=color.gray, textcolor=color.white, text="cancel\nshort", size=size.tiny)
strategy.entry("Long", strategy.long, when=GoLong, stop=close+entry_distance*syminfo.mintick)
strategy.exit("XLong", from_entry="Long", stop=stoploss_long, profit=TakeProfitLevel)
strategy.cancel("Long", when = CancelLong)
strategy.entry("Short", strategy.short, when=GoShort, stop=close-entry_distance*syminfo.mintick)
strategy.exit("XShort", from_entry="Short", stop=stoploss_short, profit=TakeProfitLevel)
strategy.cancel("Short", when = CancelShort)
if GoLong
alertsyntax_golong='long offset=' + tostring(entry_distance) + ' slprice=' + tostring(stoploss_long) + ' tp=' + tostring(TakeProfitLevel)
alert(message=alertsyntax_golong, freq=alert.freq_once_per_bar_close)
if GoShort
alertsyntax_goshort='short offset=' + tostring(-entry_distance) + ' slprice=' + tostring(stoploss_short) + ' tp=' + tostring(TakeProfitLevel)
alert(message=alertsyntax_goshort, freq=alert.freq_once_per_bar_close)
if CancelLong
alertsyntax_cancellong='cancel long'
alert(message=alertsyntax_cancellong, freq=alert.freq_once_per_bar_close)
if CancelShort
alertsyntax_cancelshort='cancel short'
alert(message=alertsyntax_cancelshort, freq=alert.freq_once_per_bar_close)