
এই কৌশলটি একটি উদ্ভাবনী প্রবণতা ট্র্যাকিং ট্রেডিং সিস্টেম যা বাজারের প্রবণতা সনাক্ত করার জন্য ডাবল-লেয়ার সূচক সমতলীকরণ প্রযুক্তি ব্যবহার করে। এই সিস্টেমটি মূল্যের ডেটাতে বিশেষ সূচক সমতলীকরণ প্রক্রিয়াকরণের মাধ্যমে দুটি প্রবণতা লাইন তৈরি করে যা বাজারের স্বল্প ও দীর্ঘমেয়াদী চলন ধরার জন্য ব্যবহৃত হয়। সিস্টেমটি একটি সম্পূর্ণ ঝুঁকি ব্যবস্থাপনা মডিউল অন্তর্ভুক্ত করে, যার মধ্যে স্টপ স্টপ লস সেটিংস এবং নমনীয় পজিশন ম্যানেজমেন্ট বৈশিষ্ট্য রয়েছে।
কৌশলটির কেন্দ্রবিন্দু হল এর অনন্য দ্বি-স্তরীয় সূচক মসৃণকরণ অ্যালগরিদম। প্রথমত, সিস্টেমটি ক্লোজিং মূল্যের উপর ওজনযুক্ত চিকিত্সা করে, যা গণনা করা হয় ((সর্বোচ্চ মূল্য + সর্বনিম্ন মূল্য + 2*এটি বাজারের গোলমালের প্রভাবকে হ্রাস করতে পারে। তারপরে, কাস্টমাইজড সূচকীয় মসৃণকরণ ফাংশন দ্বারা, যথাক্রমে 9 টি এবং 30 টি চক্রের মসৃণকরণ কার্ভ গণনা করা হয়। যখন স্বল্পমেয়াদী কার্ভ দীর্ঘমেয়াদী কার্ভকে অতিক্রম করে, তখন সিস্টেমটি একটি ট্রেডিং সংকেত তৈরি করে।
এটি একটি যুক্তিসঙ্গত, যুক্তিসঙ্গত এবং সুস্পষ্ট প্রবণতা ট্র্যাকিং সিস্টেম। দ্বি-স্তর সূচক মসৃণ প্রযুক্তি এবং একটি সম্পূর্ণ ঝুঁকি ব্যবস্থাপনা সিস্টেমের মাধ্যমে, কৌশলটি প্রবণতা বাজারে ভাল পারফরম্যান্স করতে পারে। তবে, ব্যবহারকারীদের তাদের ঝুঁকি বহনযোগ্যতার উপর ভিত্তি করে পজিশনের আকারটি সামঞ্জস্য করতে হবে, এবং রিয়েল-টাইম ট্রেডিংয়ের আগে পর্যাপ্ত ব্যাক-টেস্টিং যাচাইয়ের পরামর্শ দেওয়া হয়। প্রস্তাবিত অপ্টিমাইজেশন দিকনির্দেশের মাধ্যমে কৌশলটির আরও উন্নতির জায়গা রয়েছে।
/*backtest
start: 2024-02-10 00:00:00
end: 2025-02-08 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Dynamic Trend Navigator AI [CodingView]", overlay=true, initial_capital=100000, default_qty_type=strategy.percent_of_equity , default_qty_value=200 )
// ==================================================================================================
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © CodingView_23
//
// Script Name: Dynamic Trend Navigator
// Developed by: theCodingView Team
// Contact: [email protected]
// Website: www.theCodingView.com
//
// Description: Implements an adaptive trend-following strategy using proprietary smoothing algorithms.
// Features include:
// - Dual timeframe trend analysis
// - Custom exponential smoothing technique
// - Integrated risk management (profit targets & stop-loss)
// - Visual trend direction indicators
// ==================================================================================================
// ====== Enhanced Input Configuration ======
primaryLookbackWindow = input.int(9, "Primary Trend Window", minval=2)
secondaryLookbackWindow = input.int(30, "Secondary Trend Window", minval=5)
// ====== Custom Exponential Smoothing Implementation ======
customSmoothingFactor(periods) =>
smoothingWeight = 2.0 / (periods + 1)
smoothingWeight
adaptivePricePosition(priceSource, lookback) =>
weightedSum = 0.0
smoothingCoefficient = customSmoothingFactor(lookback)
cumulativeWeight = 0.0
for iteration = 0 to lookback - 1 by 1
historicalWeight = math.pow(1 - smoothingCoefficient, iteration)
weightedSum := weightedSum + priceSource[iteration] * historicalWeight
cumulativeWeight := cumulativeWeight + historicalWeight
weightedSum / cumulativeWeight
// ====== Price Transformation Pipeline ======
modifiedClose = (high + low + close * 2) / 4
smoothedSeries1 = adaptivePricePosition(modifiedClose, primaryLookbackWindow)
smoothedSeries2 = adaptivePricePosition(modifiedClose, secondaryLookbackWindow)
// ====== Signal Detection System ======
trendDirectionUp = smoothedSeries1 > smoothedSeries2 and smoothedSeries1[1] <= smoothedSeries2[1]
trendDirectionDown = smoothedSeries1 < smoothedSeries2 and smoothedSeries1[1] >= smoothedSeries2[1]
// ====== Visual Representation Module ======
plot(smoothedSeries1, "Dynamic Trend Line", #4CAF50, 2)
plot(smoothedSeries2, "Market Phase Reference", #F44336, 2)
// ====== Risk Management Configuration ======
enableRiskParameters = input.bool(true, "Activate Risk Controls")
profitTargetUnits = input.float(30, "Profit Target Points")
lossLimitUnits = input.float(30, "Stop-Loss Points")
// ====== Position Management Logic ======
var float entryPrice = na
var float profitTarget = na
var float stopLoss = na
// ====== Long Position Logic ======
if trendDirectionUp
strategy.close("Short", comment="Short Close")
strategy.entry("Long", strategy.long)
entryPrice := close
profitTarget := close + profitTargetUnits
stopLoss := close - lossLimitUnits
if enableRiskParameters
strategy.exit("Long Exit", "Long", limit=profitTarget, stop=stopLoss)
// ====== Short Position Logic ======
if trendDirectionDown
strategy.close("Long", comment="Long Close")
strategy.entry("Short", strategy.short)
entryPrice := close
profitTarget := close - profitTargetUnits
stopLoss := close + lossLimitUnits
if enableRiskParameters
strategy.exit("Short Exit", "Short", limit=profitTarget, stop=stopLoss)
// ====== Visual Signals ======
plotshape(trendDirectionUp, "Bullish", shape.labelup, location.belowbar, #00C853, text="▲", textcolor=color.white)
plotshape(trendDirectionDown, "Bearish", shape.labeldown, location.abovebar, #D50000, text="▼", textcolor=color.white)
// ====== Branding Module ======
var brandingTable = table.new(position.bottom_right, 1, 1)
if barstate.islast
table.cell(brandingTable, 0, 0, "Trading System v2.0", text_color=color.new(#607D8B, 50))