
এই কৌশলটি একটি ট্রেডিং সিস্টেম যা ফিবোনাচি রিটার্নের স্তর এবং কে-লাইন ফর্ম্যাটের উপর ভিত্তি করে। এটি একাধিক সময়কালের উপর কাজ করে, প্রযুক্তিগত বিশ্লেষণ এবং ঝুঁকি ব্যবস্থাপনার নীতিগুলি একত্রিত করে। কৌশলটি মূলত সম্ভাব্য ট্রেডিংয়ের সুযোগগুলি খুঁজে বের করার জন্য গুরুত্বপূর্ণ ফিবোনাচি রিটার্নের স্তরগুলি (০.৬১৮ এবং ০.৭৮৬) সনাক্ত করে এবং স্টপ লস এবং লাভের লক্ষ্যমাত্রা ব্যবহার করে ঝুঁকি পরিচালনা করে।
কৌশলটির মূল যুক্তি নিম্নলিখিত মূল উপাদানগুলির উপর ভিত্তি করে:
এটি একটি সুসংগঠিত প্রবণতা অনুসরণ কৌশল যা ব্যবসায়ীদের একটি পদ্ধতিগত ট্রেডিং পদ্ধতি সরবরাহ করে, ফিবোনাচি রিট্র্যাক্ট, কে-লাইন ফর্ম্যাট এবং ঝুঁকি পরিচালনার নীতিগুলিকে একত্রিত করে। যদিও কিছু ঝুঁকি রয়েছে, তবে প্রস্তাবিত অপ্টিমাইজেশান দিকনির্দেশগুলি কৌশলটির স্থায়িত্ব এবং নির্ভরযোগ্যতা আরও বাড়িয়ে তুলতে পারে। কৌশলটির বহু-চক্রের বৈশিষ্ট্য এবং কাস্টমাইজযোগ্য প্যারামিটারগুলি এটি বিভিন্ন ধরণের ব্যবসায়ীদের ব্যবহারের জন্য উপযুক্ত করে তোলে।
/*backtest
start: 2024-12-03 00:00:00
end: 2024-12-10 00:00:00
period: 2m
basePeriod: 2m
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/
// © jontucklogic7467
//@version=5
strategy("Fibonacci Swing Trading Bot", overlay=true)
// Input parameters
fiboLevel1 = input.float(0.618, title="Fibonacci Retracement Level 1")
fiboLevel2 = input.float(0.786, title="Fibonacci Retracement Level 2")
riskRewardRatio = input.float(2.0, title="Risk/Reward Ratio")
stopLossPerc = input.float(1.0, title="Stop Loss Percentage") / 100
// Timeframe selection
useTimeframe = input.timeframe("240", title="Timeframe for Analysis", options=["240", "D", "W", "M"])
// Request data from selected timeframe
highTF = request.security(syminfo.tickerid, useTimeframe, high)
lowTF = request.security(syminfo.tickerid, useTimeframe, low)
// Swing high and low calculation over the last 50 bars in the selected timeframe
highestHigh = ta.highest(highTF, 50)
lowestLow = ta.lowest(lowTF, 50)
// Fibonacci retracement levels
fib618 = highestHigh - (highestHigh - lowestLow) * fiboLevel1
fib786 = highestHigh - (highestHigh - lowestLow) * fiboLevel2
// Plot Fibonacci levels
// line.new(bar_index[1], fib618, bar_index, fib618, color=color.red, width=2, style=line.style_dashed)
// line.new(bar_index[1], fib786, bar_index, fib786, color=color.orange, width=2, style=line.style_dashed)
// Entry signals based on candlestick patterns and Fibonacci levels
bullishCandle = close > open and close > fib618 and close < highestHigh
bearishCandle = close < open and close < fib786 and close > lowestLow
// Stop loss and take profit calculation
stopLoss = bullishCandle ? close * (1 - stopLossPerc) : close * (1 + stopLossPerc)
takeProfit = bullishCandle ? close + (close - stopLoss) * riskRewardRatio : close - (stopLoss - close) * riskRewardRatio
// Plot buy and sell signals
if bullishCandle
strategy.entry("Buy", strategy.long)
strategy.exit("Take Profit", "Buy", limit=takeProfit, stop=stopLoss)
if bearishCandle
strategy.entry("Sell", strategy.short)
strategy.exit("Take Profit", "Sell", limit=takeProfit, stop=stopLoss)