
Fear and Greed Index এর উপর ভিত্তি করে ডায়নামিক অবমূল্যায়ন ট্রেডিং কৌশল হল একটি স্বয়ংক্রিয় ট্রেডিং সিস্টেম যা বাজারে আতঙ্ক এবং লোভের অনুভূতি ক্যাপচার করে ট্রেডিং সিদ্ধান্ত নেয়। এই কৌশলটি ডায়নামিক পরিবর্তনগুলি ব্যবহার করে, চরম আতঙ্কের সময় প্রবেশ করে এবং চরম লোভের সময় প্রস্থান করে, বাজারের মনোবিজ্ঞানের উপর আধিপত্য রেখে সম্ভাব্য ব্যবসায়ের সুযোগগুলি অর্জন করে।
এই কৌশলটির মূল উদ্দেশ্য হল বাজারের মনোভাবের বিপর্যয় চিহ্নিত করা, যা ডিনহুই সূচকের গতিশীল পরিবর্তনগুলি পর্যবেক্ষণ করে।
এটি একটি উদ্ভাবনী ট্রেডিং কৌশল যা বাজারের মনোবিজ্ঞানের উপর ভিত্তি করে, বাজারের আবেগকে পরিমাণে পরিমাপ করে ট্রেডিংয়ের সুযোগগুলি ক্যাপচার করে। যদিও কিছু সম্ভাব্য ঝুঁকি রয়েছে, তবে ক্রমাগত অপ্টিমাইজেশন এবং পরিমার্জনের মাধ্যমে কৌশলটি বাস্তব ব্যবসায়ের ক্ষেত্রে স্থিতিশীল পারফরম্যান্সের প্রত্যাশিত। ব্যবসায়ীদের রিয়েল-টাইমে ব্যবহারের আগে পর্যাপ্ত ফিডব্যাক এবং প্যারামিটার অপ্টিমাইজেশন করার পরামর্শ দেওয়া হয়।
/*backtest
start: 2024-02-22 00:00:00
end: 2025-02-19 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Binance","currency":"ETH_USDT"}]
*/
//@version=6
strategy("Fear and Greed Trading Strategy", overlay=false)
// Manually input Fear and Greed Index data (example values for demo)
fear_and_greed = array.from(40, 35, 50, 60, 45, 80, 20, 10) // Replace with your data points
// Get the current bar index within the array bounds
current_index = bar_index % array.size(fear_and_greed)
// Extract data for the current bar
fgi_value = array.get(fear_and_greed, current_index)
// Initialize variables for previous index and value
var float fgi_prev = na
if (current_index > 0)
fgi_prev := array.get(fear_and_greed, current_index - 1)
// Set thresholds
fear_threshold = 25
greed_threshold = 75
// Determine current and previous states
state_prev = na(fgi_prev) ? "neutral" : fgi_prev < fear_threshold ? "fear" : fgi_prev > greed_threshold ? "greed" : "neutral"
state_curr = fgi_value < fear_threshold ? "fear" : fgi_value > greed_threshold ? "greed" : "neutral"
// Buy and sell conditions
buy_condition = state_prev != "greed" and state_curr == "greed"
sell_condition = state_prev != "fear" and state_curr == "fear"
// Execute trades
if (buy_condition)
strategy.entry("Buy", strategy.long, qty=100)
if (sell_condition)
strategy.close("Buy")
// Plotting for visualization
plot(fgi_value, color=color.new(color.white, 0), linewidth=2, title="Fear and Greed Index")
hline(fear_threshold, "Fear Threshold", color=color.red, linestyle=hline.style_dashed)
hline(greed_threshold, "Greed Threshold", color=color.green, linestyle=hline.style_dashed)
// Add labels for actions
if (buy_condition)
label.new(bar_index, fgi_value, "Buy", style=label.style_label_down, color=color.green, textcolor=color.white)
if (sell_condition)
label.new(bar_index, fgi_value, "Sell", style=label.style_label_up, color=color.red, textcolor=color.white)