
এই কৌশলটি একটি ট্রেডিং সিস্টেম যা একাধিক টাইম ফ্রেম এলোমেলো স্টোক্যাস্টিক সূচকগুলির উপর ভিত্তি করে ট্রেডিং সিস্টেম যা প্রবণতা নিশ্চিতকরণ এবং মূল্য আকৃতি বিশ্লেষণের সাথে মিলিত। কৌশলটি 15 মিনিট, 30 মিনিট এবং 60 মিনিটের তিনটি সময়কাল ব্যবহার করে, ট্রেডিং সুযোগগুলি সনাক্ত করার জন্য এলোমেলো সূচকগুলির ক্রস সিগন্যাল এবং উচ্চতর উচ্চ এবং নিম্নতর নিম্নের আকৃতির মাধ্যমে। একই সাথে, কৌশলটি ঝুঁকি নিয়ন্ত্রণ এবং লাভের জন্য নির্দিষ্ট শতাংশ স্টপ লস এবং লাভের সেটিং ব্যবহার করে।
কৌশলটির মূল যুক্তিতে নিম্নলিখিত মূল অংশগুলি অন্তর্ভুক্ত রয়েছে:
এটি একটি সম্পূর্ণ ট্রেডিং সিস্টেম যা একাধিক টাইম সাইকেল বিশ্লেষণ এবং প্রবণতা নিশ্চিতকরণের সাথে মিলিত। এটি র্যান্ডম সূচক এবং মূল্যের আকারের সমন্বয় ব্যবহার করে বাজারের বিপর্যয়কে আরও ভালভাবে ধরতে সক্ষম। নির্দিষ্ট ঝুঁকি পরিচালনার পরামিতিগুলি সহজ হলেও ব্যবসায়ের ধারাবাহিকতা নিশ্চিত করে। এই কৌশলটি উচ্চতর অস্থিরতার জন্য উপযুক্ত, তবে এখনও ব্যবসায়ীদের নির্দিষ্ট বাজারের পরিবেশের উপর ভিত্তি করে প্যারামিটার অপ্টিমাইজ করার প্রয়োজন।
/*backtest
start: 2025-01-19 00:00:00
end: 2025-02-18 00:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Swing Fairas Oil", overlay=true)
// Pilih Timeframe Utama & 2 Timeframe Konfirmasi
tf_main = "15"
tf_mid = "30"
tf_high = "60"
// Parameter Stochastic
length = input(15, title="Stochastic Length")
k_smooth = input(4, title="K Smoothing")
d_smooth = input(5, title="D Smoothing")
// Overbought & Oversold Levels
overbought = input(85, title="Overbought Level")
oversold = input(15, title="Oversold Level")
// Stochastic pada Timeframe Utama
k1 = ta.sma(ta.stoch(close, high, low, length), k_smooth)
d1 = ta.sma(k1, d_smooth)
// Stochastic pada Timeframe Menengah
k2 = request.security(syminfo.tickerid, tf_mid, ta.sma(ta.stoch(close, high, low, length), k_smooth))
d2 = request.security(syminfo.tickerid, tf_mid, ta.sma(k2, d_smooth))
// Stochastic pada Timeframe Tinggi
k3 = request.security(syminfo.tickerid, tf_high, ta.sma(ta.stoch(close, high, low, length), k_smooth))
d3 = request.security(syminfo.tickerid, tf_high, ta.sma(k3, d_smooth))
// **Konfirmasi Higher High & Lower Low**
hh = ta.highest(high, 5) // Highest High dalam 5 candle terakhir
ll = ta.lowest(low, 5) // Lowest Low dalam 5 candle terakhir
// **Kondisi Buy**
confirm_buy = ta.crossover(k1, d1) and k1 < oversold // Stochastic Bullish
higher_low = low > ta.lowest(low[1], 5) // Higher Low terbentuk
longCondition = confirm_buy and higher_low
// **Kondisi Sell**
confirm_sell = ta.crossunder(k1, d1) and k1 > overbought // Stochastic Bearish
lower_high = high < ta.highest(high[1], 5) // Lower High terbentuk
shortCondition = confirm_sell and lower_high
// Stop Loss & Take Profit
sl = input(3.7, title="Stop Loss (%)") / 100
tp = input(1.8, title="Take Profit (%)") / 100
longStopLoss = close * (1 - sl)
longTakeProfit = close * (1 + tp)
shortStopLoss = close * (1 + sl)
shortTakeProfit = close * (1 - tp)
// Eksekusi Order
if longCondition
strategy.entry("Buy", strategy.long)
strategy.exit("Sell TP/SL", from_entry="Buy", stop=longStopLoss, limit=longTakeProfit)
if shortCondition
strategy.entry("Sell", strategy.short)
strategy.exit("Cover TP/SL", from_entry="Sell", stop=shortStopLoss, limit=shortTakeProfit)
// Label Buy & Sell
if longCondition
label.new(bar_index, low, "BUY", color=color.green, textcolor=color.white, size=size.small, style=label.style_label_down)
if shortCondition
label.new(bar_index, high, "SELL", color=color.red, textcolor=color.white, size=size.small, style=label.style_label_up)
// Label Stop Loss & Take Profit
if longCondition
label.new(bar_index, longStopLoss, "SL: " + str.tostring(longStopLoss, "#.##"), color=color.red, textcolor=color.white, size=size.small, style=label.style_label_left)
label.new(bar_index, longTakeProfit, "TP: " + str.tostring(longTakeProfit, "#.##"), color=color.green, textcolor=color.white, size=size.small, style=label.style_label_left)
if shortCondition
label.new(bar_index, shortStopLoss, "SL: " + str.tostring(shortStopLoss, "#.##"), color=color.red, textcolor=color.white, size=size.small, style=label.style_label_left)
label.new(bar_index, shortTakeProfit, "TP: " + str.tostring(shortTakeProfit, "#.##"), color=color.green, textcolor=color.white, size=size.small, style=label.style_label_left)