
এই কৌশলটি ইন্ডেক্সের মুভিং এভারেজ (EMA), সর্বোচ্চ মূল্য, সর্বনিম্ন মূল্য এবং গড় প্রকৃত তরঙ্গদৈর্ঘ্য (ATR) এর মতো প্রযুক্তিগত সূচক ব্যবহার করে, দামের সাথে EMA, সর্বোচ্চ মূল্য এবং সর্বনিম্ন মূল্যের সম্পর্ক বিচার করে, বর্তমান প্রবণতার দিকটি সনাক্ত করে, সর্বনিম্ন মূল্য অতিক্রম করার সময় ক্রয় করে, যখন সর্বোচ্চ মূল্য অতিক্রম করে বা গতিশীল প্রতিরোধের স্তরকে স্পর্শ করে তখন বিক্রি করে, প্রবণতাটি ক্যাপচার করে এবং অতিরিক্ত লাভ অর্জন করে।
এই কৌশলটি ইএমএ, সর্বোচ্চ মূল্য, সর্বনিম্ন মূল্যের মতো প্রযুক্তিগত সূচকগুলি ব্যবহার করে এবং এটিআর-এর সাথে মিলিত হয়, গতিশীল চ্যানেল তৈরি করে, সর্বোচ্চ মূল্য এবং সর্বনিম্ন মূল্যকে পরাস্ত করে ট্রেডিং সংকেত উত্পন্ন করে, ট্রেন্ডের গতি ধরার জন্য একটি সহজ ব্যবহারিক প্রবণতা ট্র্যাকিং কৌশল। কৌশলটি প্যারামিটারগুলি সামঞ্জস্যযোগ্য, অভিযোজনযোগ্য এবং নমনীয়, তবে বাজারের অস্থিরতার ক্ষেত্রে দুর্বল পারফরম্যান্স হতে পারে, আরও সূচক, অনুকূলিতকরণ প্যারামিটার এবং বায়ু নিয়ন্ত্রণের সংযোজনের মাধ্যমে আরও অপ্টিমাইজেশন এবং উন্নতির প্রয়োজন।
/*backtest
start: 2023-05-05 00:00:00
end: 2024-05-10 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Maboi_q
//@version=5
strategy("buy sell Trend", overlay=true)
atr_length = input.int(defval=14, title='atr length')
highest_length = input.int(defval=60, title='highest length')
highest_s_length = input.int(defval=60, title='sell highest length')
lowest_length = input.int(defval=30, title='lowest length')
sell_l_length = input.int(defval=55, title='sell line length')
f = 2.382
f2 = 5.618
atr = ta.atr(atr_length)
highest = ta.highest(highest_length)
lowest = ta.lowest(lowest_length)
f_atr = atr * f
ema_hl = ta.ema((highest[1] + lowest[1]) / 2, 14)
ema_highest = ema_hl + f_atr
ema_lowest = ema_hl - f_atr
ema_mid = (ema_highest + ema_lowest) / 2
bs_hi = ta.highest(highest_s_length)
f_atr2 = atr * f2
sell_line = ta.ema(bs_hi[1] + f_atr2, sell_l_length)
buy_cond = ta.crossover(ema_lowest, lowest) and close < ema_mid
sell_cond = (ta.crossunder(ema_highest, highest) and close > ema_mid) or high >= sell_line
if buy_cond
strategy.entry('BUY', strategy.long)
if sell_cond
strategy.entry('SELL', strategy.short)
plot(sell_line, color=color.new(color.maroon, 50))
plot(highest, color=color.new(color.red, 50))
plot(lowest, color=color.new(color.green, 50))
plot(ema_highest, color=color.new(color.blue, 50))
// plot(ema_mid, color=color.new(color.gray, 50))
plot(ema_lowest, color=color.new(color.blue, 50))
plotshape(buy_cond, title='buy', style=shape.triangleup, location=location.belowbar,
color=color.green, textcolor=color.green, size=size.tiny)
plotshape(sell_cond, title='sell', style=shape.triangledown, location=location.abovebar,
color=color.red, textcolor=color.red, size=size.tiny)