
আরএসআই ইন্ডিকেটর ট্র্যাপিং ট্রেডিং কৌশলটি আরএসআই এবং সিসিআই প্রযুক্তিগত সূচকগুলির সমন্বিত একটি স্থির গ্রিড ট্রেডিং পদ্ধতি। এই কৌশলটি আরএসআই এবং সিসিআই সূচকগুলির মানের ভিত্তিতে প্রবেশের সময় নির্ধারণ করে, স্থির মুনাফা অনুপাত এবং স্থির গ্রিডের সংখ্যা ব্যবহার করে স্টপ অর্ডার এবং পজিশনিং অর্ডার সেট করার জন্য। একই সাথে, কৌশলটি বিচ্ছিন্ন মূল্য পরিবর্তনের জন্য একটি সুরক্ষা ব্যবস্থাও অন্তর্ভুক্ত করে।
যখন 5 মিনিটের এবং 30 মিনিটের RSI সূচকটি সেট থ্রেশহোল্ডের নিচে থাকে এবং 1 ঘন্টা CCI সূচকটি সেট মানের নিচে থাকে, তখন একটি মাল্টি-সিগন্যাল তৈরি করা হয়। এই সময়ে, বর্তমান ক্লোজ মূল্যটি প্রবেশের মূল্য হিসাবে রেকর্ড করা হয় এবং অ্যাকাউন্টের লিভারেজ এবং গ্রিডের সংখ্যার উপর ভিত্তি করে প্রথম পজিশনের একক গণনা করা হয়।
প্রারম্ভিক মূল্যকে বেঞ্চমার্ক হিসাবে গ্রহণ করে, লক্ষ্যযুক্ত মুনাফা অনুপাত অনুসারে মুনাফা মূল্য গণনা করা হয় এবং এই মূল্যের স্তরে একটি স্টপ অর্ডার সেট করা হয়।
প্রথম একক ব্যতীত, বাকি ফিক্সড পজিশনের এককগুলি ইনপুট সিগন্যালের পরে একের পর এক বের করা হয়, যতক্ষণ না সেট করা গ্রিডের সংখ্যা পৌঁছে যায়।
যদি দাম প্রবেশের দামের তুলনায় বৃদ্ধি পায় এবং সেট করা হিজরি হ্রাসের শতাংশের চেয়ে বেশি হয়, তবে সমস্ত পজিশনের হিজরি প্লেইন করা হবে।
যদি দাম প্রবেশের দামের চেয়ে কমে যায়, তাহলে সমস্ত অর্ডার বাতিল করে নতুন প্রবেশের জন্য অপেক্ষা করতে হবে।
সূচক প্যারামিটারগুলিকে সামঞ্জস্য করে, ঝুঁকির মাত্রা বাড়িয়ে এবং বিপরীতের মাত্রা কমিয়ে এই ঝুঁকিগুলি হ্রাস করা যেতে পারে।
RSI সূচক ক্যাপিং ট্রেডিং কৌশল সূচক দ্বারা প্রবেশের সময় নির্ধারণ করে, স্থিতিশীল মুনাফা লক করার জন্য ফিক্সড গ্রিড স্টপ এবং পজিশনিং ব্যবহার করে। একই সময়ে, কৌশলটি ব্যাপক ওঠানামা এবং বিপরীত হওয়ার পরে পুনরায় প্রবেশের জন্য একটি সুরক্ষা ব্যবস্থা রয়েছে। এই একাধিক প্রক্রিয়া সমন্বিত কৌশলটি ব্যবসায়ের ঝুঁকি হ্রাস করতে এবং লাভের হার বাড়ানোর জন্য ব্যবহার করা যেতে পারে। সূচক এবং প্যারামিটার সেটিং আরও অনুকূলিত করে, আরও ভাল ক্যাপিং কার্যকারিতা অর্জন করা যেতে পারে।
/*backtest
start: 2023-12-01 00:00:00
end: 2023-12-31 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Custom RSI/CCI Strategy with Fixed Grid", shorttitle="INVESTCOIN_RSI_CCI_Fixed_Grid", overlay=true)
// Input parameters
input_rsi_5min_value = 55
input_rsi_30min_value = 65
input_cci_1hr_value = 85
input_profit_target_percent = 0.6 // Target profit in percentage
input_grid_size = 15 // Number of orders in grid
input_hedging_percent = 20 // Percentage price change for hedging
input_first_order_offset = 0.2 // Offset for the first order in percentage
input_reversal_percent = 0.4 // Percentage price change for reversal
// Calculating the RSI and CCI values
rsi_5min = ta.rsi(close, 5)
rsi_30min = ta.rsi(close, 30)
cci_1hr = ta.cci(close, 60)
// Define strategy conditions based on the provided screenshot
long_condition = (rsi_5min < input_rsi_5min_value) and (rsi_30min < input_rsi_30min_value) and (cci_1hr < input_cci_1hr_value)
// Plot signals
plotshape(series=long_condition, title="Long Entry Signal", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
// Initialize a variable to store the entry price
var float entry_price = na
// Initialize a variable to store the profit target
var float profit_target = na
// Hedge condition based on price change percentage
var float hedge_price = na
// Initialize a variable to count the total number of orders
var int total_orders = 0
// Calculate the initial order size based on account equity and grid size
var float initial_order_size = 1 / input_grid_size / 100
// Entry orders with fixed size
if (long_condition and total_orders < 9000)
// Place first order with an offset
if total_orders == 0
strategy.order("First Long", strategy.long, qty=initial_order_size, limit=close * (1 - input_first_order_offset / 100))
total_orders := total_orders + 1
// Place remaining grid orders
for i = 1 to input_grid_size - 1
if (total_orders >= 9000)
break // Stop if max orders reached
strategy.entry("Long_" + str.tostring(i), strategy.long, qty=initial_order_size)
total_orders := total_orders + 1
// Calculate the profit target in currency
if (long_condition)
entry_price := close // Store the entry price when the condition is true
if (not na(entry_price))
profit_target := entry_price * input_profit_target_percent / 100 // Calculate the profit target
// Setting up the profit target
if (not na(profit_target))
strategy.exit("Take Profit", "Long", limit=entry_price + profit_target)
// Hedge by closing all positions if the price increases by the hedging percentage
if (strategy.position_size > 0)
hedge_price := close * (1 + input_hedging_percent / 100)
if (not na(hedge_price) and close >= hedge_price)
strategy.close_all(comment="Hedging")
// Reversal condition based on the price change percentage
var float reversal_price = na
if (strategy.position_size > 0 and total_orders > 1) // Check if at least one grid order has been placed
reversal_price := entry_price * (1 - input_reversal_percent / 100)
// Cancel trades and wait for a new entry point if the price reverses by the specified percentage
if (not na(reversal_price) and close <= reversal_price)
strategy.cancel_all()
total_orders := 0 // Reset the total orders count after cancellation