
এই কৌশলটি তুলনামূলকভাবে দুর্বল সূচক (আরএসআই) ব্যবহার করে বাজারের ওভারসোল্ড অবস্থা বিচার করে, যখন আরএসআই সেট ওভারসোল্ড থ্রেশহোল্ডের নীচে থাকে তখন একটি ক্রয় সংকেত তৈরি করে, এবং একই সাথে স্টপ লস (স্টপ লস) এবং স্টপ লস (টেক প্রফিট) সেট করে ঝুঁকি নিয়ন্ত্রণ এবং মুনাফা লক করার জন্য। এই কৌশলটি কেবলমাত্র বেশি করে, খালি করে না।
এই কৌশলটি আরএসআই সূচকগুলির মাধ্যমে বাজারের ওভারসোল্ড রিটার্নের সুযোগগুলি ক্যাপচার করে এবং ঝুঁকি নিয়ন্ত্রণের জন্য একটি নির্দিষ্ট স্টপ লস সেট করে। কৌশলটির যুক্তিটি সহজ এবং পরিষ্কার, এটি নবীনদের জন্য উপযুক্ত। তবে এই কৌশলটির কিছু সীমাবদ্ধতা রয়েছে, যেমন প্রবণতা ধরে রাখার দুর্বল ক্ষমতা, সংকেতের নির্ভরযোগ্যতা উন্নত করা দরকার ইত্যাদি। সুতরাং, বাস্তব প্রয়োগে, প্রবণতা বিচার, স্টপ লস অপ্টিমাইজেশন, সূচক সমন্বয় ইত্যাদির দিক থেকে কৌশলটি অনুকূলিতকরণ এবং উন্নত করা যেতে পারে, যাতে আরও স্থিতিশীল ব্যবসায়ের পারফরম্যান্স অর্জন করা যায়।
/*backtest
start: 2024-05-01 00:00:00
end: 2024-05-31 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Estratégia com RSI (Apenas Compras)", overlay=true)
// Parâmetros de entrada
rsiLength = input.int(14, title="Período do RSI")
oversold = input.int(30, title="Nível de Sobrevenda (RSI)")
stopLossPercent = input.float(2.0, title="Stop Loss (%)")
takeProfitPercent = input.float(5.0, title="Take Profit (%)")
// Cálculo do RSI
rsi = ta.rsi(close, rsiLength)
// Sinal de Compra
buySignal = ta.crossover(rsi, oversold)
// Plotando o sinal de compra
plotshape(series=buySignal, location=location.belowbar, color=color.green, style=shape.labelup, title="Compra", text="Buy")
// Variáveis para Stop Loss e Take Profit
var float longStop = na
var float longTake = na
// Entrando na posição de compra
if (buySignal)
entryPrice = close
longStop := entryPrice * (1 - stopLossPercent / 100)
longTake := entryPrice * (1 + takeProfitPercent / 100)
strategy.entry("Compra", strategy.long)
label.new(x=bar_index, y=low, text="Compra", style=label.style_label_up, color=color.green)
// Gerenciamento de Stop Loss e Take Profit
if (strategy.position_size > 0)
if (close <= longStop)
strategy.close("Compra", comment="Stop Loss")
label.new(x=bar_index, y=low, text="Stop Loss", style=label.style_label_down, color=color.red)
if (close >= longTake)
strategy.close("Compra", comment="Take Profit")
label.new(x=bar_index, y=high, text="Take Profit", style=label.style_label_up, color=color.green)
// Plotando as linhas de Stop Loss e Take Profit
plot(longStop, color=color.red, linewidth=1, title="Stop Loss Long")
plot(longTake, color=color.green, linewidth=1, title="Take Profit Long")