এই কৌশলটি স্টোক্যাস্টিক ওসিলিটার সূচকের উপর ভিত্তি করে বাজারের ওভার-বই ওভার-সেলের অবস্থা নির্ধারণ করে এবং ইলাস্টিক স্টপ-অফ নীতির সাথে সংযুক্ত করে স্বল্পমেয়াদী লেনদেন করে। স্টোক্যাস্টিক সূচকের উপর গোল্ড ফর্কের সময় বেশি করুন, মৃত ফর্কের সময় শূন্য করুন, এবং পূর্ববর্তী মেরু পয়েন্টের উপর ভিত্তি করে ইলাস্টিক স্টপ-অফ সেট করুন, লাভের গ্যারান্টি দেওয়ার সময় ঝুঁকি নিয়ন্ত্রণ করুন।
Stochastic oscillator indicator contains %K line and %D line. যখন %K line নীচে থেকে উপরে%D line অতিক্রম করে, তখন গোল্ডেন ফর্ক সিগন্যাল হিসেবে, বেশি করুন; যখন %K line উপরে থেকে নীচে%D line অতিক্রম করে, তখন ডেড ফর্ক সিগন্যাল হিসেবে, শূন্য করুন। এই কৌশলটি হল Stochastic indicator এর উপর ভিত্তি করে গোল্ডেন ফর্ক ডেড ফর্ক সিগন্যাল বিচার করা।
বিশেষ করে, স্টোক্যাস্টিক সূচক গোল্ড ফর্কে, যদি %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)