MACD حقیقی سطح کی حکمت عملی MACD اشارے اور حقیقی سطح کے بینڈ اشارے کا استعمال خرید و فروخت کے اشارے کا فیصلہ کرنے کے لئے کرتی ہے۔ یہ MACD کی بنیاد پر ، حقیقی سطح کے بینڈ کے استعمال میں اضافہ کرتا ہے ، جس سے رجحان کا آغاز اور اختتام زیادہ درست طریقے سے طے کیا جاسکتا ہے۔
اس حکمت عملی نے پہلے MACD اشارے کا حساب لگایا اور پھر 14 مختلف ادوار کی حقیقی سطح کی بینڈوں کا حساب لگایا۔ حقیقی سطح کی بینڈ قیمت کی لکیری واپسی کی لکیر اور مختلف لمبائی کے ادوار کے معیاری فرق کے مطابق ہے۔ اس کے بعد ان میں سے سب سے زیادہ اوپری ٹریک اور کم سے کم ڈاون ٹریک کو منتخب کیا گیا ہے تاکہ یہ فیصلہ کیا جاسکے کہ آیا خرابی خرید و فروخت کے اشارے کے طور پر ہے۔
خاص طور پر ، حکمت عملی کا داخلہ سگنل MACD اشارے کے گولڈ فورک یا قیمت میں اضافے کے اختیارات کے لئے حقیقی سطح کے نیچے کی ریل ہے ، اور باہر نکلنے کا سگنل MACD اشارے کے ڈیڈ فورک یا قیمت میں اضافے کے اختیارات کے لئے حقیقی سطح کی ریل ہے۔
حقیقی سطح کے بینڈ کا استعمال کرنے کا فائدہ یہ ہے کہ یہ رجحان کی سمت اور اتار چڑھاؤ کی حد کو جوڑتا ہے ، جس سے رجحان کے آغاز اور اختتام کا زیادہ درست اندازہ لگایا جاسکتا ہے۔ صرف MACD استعمال کرنے کے مقابلے میں ، حقیقی سطح کے بینڈ فلٹر کو شامل کرنے سے جعلی سگنل کم ہوسکتے ہیں۔
MACD کا استعمال کرتے ہوئے رجحانات کی سمت کا تعین کرنے کے لئے استعمال کیا جاتا ہے، جو رجحانات کو مؤثر طریقے سے ٹریک کرنے کے قابل ہے.
حقیقی سطح کے بینڈ کے اشارے کو شامل کریں ، جعلی توڑ کو فلٹر کریں ، رجحان کی تصدیق کریں۔ حقیقی سطح کے بینڈ میں قیمت کے رجحانات اور اتار چڑھاؤ کی حد کو بھی مدنظر رکھا گیا ہے ، اور اس سے زیادہ درست فیصلہ کیا جاسکتا ہے۔
حقیقی سطح کے بینڈ میں متعدد ادوار شامل ہیں ، جس سے رجحان کی تبدیلیوں کا مکمل اندازہ لگایا جاسکتا ہے۔
مختلف مارکیٹ کے حالات کو اپنانے کے لئے سچائی کی سطح کے بینڈ پیرامیٹرز کو ایڈجسٹ کیا جاسکتا ہے۔
اس کے علاوہ ، یہ ایک بہت ہی آسان ٹول ہے ، جس میں آپ کو ایک ہی وقت میں ایک سے زیادہ ٹریڈنگ آپشنز کی حمایت کرنے کی اجازت دیتا ہے۔
MACD ایک واحد اشارے کے طور پر ، زیادہ جعلی سگنل پیدا کرسکتا ہے ، جس میں حقیقی سطح کی بینڈ فلٹرنگ کی ضرورت ہوتی ہے۔
حقیقی بینڈ پیرامیٹرز کی غلط ترتیب سے لیک اور لیک ہوسکتی ہے۔ مارکیٹ کے مطابق پیرامیٹرز کو ایڈجسٹ کرنے کی ضرورت ہے۔
کثیر فضائی آپریشن کے لئے کافی فنڈز کی ضرورت ہوتی ہے، ورنہ یہ ایک دھماکہ ہوسکتا ہے.
بریک ٹریڈنگ میں خود ہی بیعانہ کا خطرہ ہوتا ہے ، اور وقت پر اسٹاپ نقصان کی ضرورت ہوتی ہے۔
کسی بھی اشارے کی حکمت عملی کا خطرہ ہے کہ وہ زرعی مصنوعات ، ڈیجیٹل کرنسیوں اور دیگر اعلی اتار چڑھاؤ والی اقسام پر لاگو نہ ہو۔
مارکیٹ کے لئے زیادہ موزوں پیرامیٹرز تلاش کرنے کے لئے زیادہ سائیکل پیرامیٹرز کی جانچ پڑتال کریں.
نقصانات کو روکنے کے لئے حکمت عملی میں اضافہ، نقصانات کے خطرے کو کم کرنے کے لئے.
دوسرے اشارے کے ساتھ مل کر ، جیسے ٹرانزیکشن ، کے ڈی جے ، وغیرہ کو فلٹر کرنا ، جعلی توڑ کو کم کیا جاسکتا ہے۔
داخلہ کے نقطہ کے انتخاب کو بہتر بنانا ، جیسے اعلی ، کم ، وغیرہ کو توڑنا ، منافع کی شرح میں اضافہ کرسکتا ہے۔
مشین لرننگ الگورتھم میں اضافہ کریں ، رجحانات کا اندازہ لگانے کے لئے ماڈل ٹریننگ کا استعمال کریں ، اور انسانی پیرامیٹرز کی ایڈجسٹمنٹ کو کم کریں۔
MACD حقیقی سطح کی حکمت عملی میں رجحان کا فیصلہ اور حد کا فیصلہ شامل ہے ، MACD کی بنیاد پر حقیقی سطح کے بینڈ اشارے شامل کیے گئے ہیں ، جس سے رجحان کا آغاز اور اختتام زیادہ درست طریقے سے طے کیا جاسکتا ہے۔ ایک واحد MACD حکمت عملی کے مقابلے میں ، یہ جعلی سگنل کو مؤثر طریقے سے فلٹر کرنے اور رجحان کے مواقع کو پکڑنے کے قابل ہے۔ اس کے ساتھ ہی کچھ خطرہ بھی موجود ہے ، جس میں پیرامیٹرز اور اسٹاپ نقصان کو بہتر بنانے کی ضرورت ہے۔ مجموعی طور پر ، یہ حکمت عملی رجحان کی تجارت کے لئے موزوں ہے ، جو درمیانی اور طویل مدتی میں مارکیٹ کے رجحان کو مستحکم طور پر پکڑنے کے قابل ہے۔
/*backtest
start: 2023-09-06 00:00:00
end: 2023-10-06 00:00:00
period: 4h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Julien_Eche
//@version=4
strategy("MACD TrueLevel Strategy", shorttitle="MACD TL", overlay=true)
// Input parameters for MACD
fastLength = input(12, title="Fast Length", type=input.integer)
slowLength = input(26, title="Slow Length", type=input.integer)
signalLength = input(9, title="Signal Length", type=input.integer)
// Inputs for selecting bands
entry_band = input(12, title="Entry TrueLevel Band", type=input.integer, minval=1, maxval=14)
exit_band = input(12, title="Exit TrueLevel Band", type=input.integer, minval=1, maxval=14)
// Input for long and short mode
long_and_short = input(false, title="Enable Long and Short", type=input.bool)
// Calculate the MACD
[macdLine, signalLine, _] = macd(close, fastLength, slowLength, signalLength)
// User inputs
len1 = input(title="Length 1", type=input.integer, defval=126)
len2 = input(title="Length 2", type=input.integer, defval=189)
len3 = input(title="Length 3", type=input.integer, defval=252)
len4 = input(title="Length 4", type=input.integer, defval=378)
len5 = input(title="Length 5", type=input.integer, defval=504)
len6 = input(title="Length 6", type=input.integer, defval=630)
len7 = input(title="Length 7", type=input.integer, defval=756)
len8 = input(title="Length 8", type=input.integer, defval=1008)
len9 = input(title="Length 9", type=input.integer, defval=1260)
len10 = input(title="Length 10", type=input.integer, defval=1638)
len11 = input(title="Length 11", type=input.integer, defval=2016)
len12 = input(title="Length 12", type=input.integer, defval=2646)
len13 = input(title="Length 13", type=input.integer, defval=3276)
len14 = input(title="Length 14", type=input.integer, defval=4284)
fill_color = input(title="Fill Color", type=input.color, defval=color.rgb(0, 191, 255, 95))
mult = input(title="Multiple", type=input.float, defval=1, step=0.2, options=[0.6, 0.8, 1, 1.2, 1.4])
src = input(title="Source", type=input.source, defval=close)
// Upper band calculation function
upperBand(length) =>
linreg = linreg(src, length, 0)
stddev = mult * stdev(src, length)
upperband = linreg + stddev
upperband
// Lower band calculation function
lowerBand(length) =>
linreg = linreg(src, length, 0)
stddev = mult * stdev(src, length)
lowerband = linreg - stddev
lowerband
// Calculate upper and lower bands for each length
upperband_1 = upperBand(len1)
upperband_2 = upperBand(len2)
upperband_3 = upperBand(len3)
upperband_4 = upperBand(len4)
upperband_5 = upperBand(len5)
upperband_6 = upperBand(len6)
upperband_7 = upperBand(len7)
upperband_8 = upperBand(len8)
upperband_9 = upperBand(len9)
upperband_10 = upperBand(len10)
upperband_11 = upperBand(len11)
upperband_12 = upperBand(len12)
upperband_13 = upperBand(len13)
upperband_14 = upperBand(len14)
lowerband_1 = lowerBand(len1)
lowerband_2 = lowerBand(len2)
lowerband_3 = lowerBand(len3)
lowerband_4 = lowerBand(len4)
lowerband_5 = lowerBand(len5)
lowerband_6 = lowerBand(len6)
lowerband_7 = lowerBand(len7)
lowerband_8 = lowerBand(len8)
lowerband_9 = lowerBand(len9)
lowerband_10 = lowerBand(len10)
lowerband_11 = lowerBand(len11)
lowerband_12 = lowerBand(len12)
lowerband_13 = lowerBand(len13)
lowerband_14 = lowerBand(len14)
// Plot envelope bands for each length
upperband_1_plot = plot(upperband_1, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Upper Band 1")
lowerband_1_plot = plot(lowerband_1, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Lower Band 1")
upperband_2_plot = plot(upperband_2, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Upper Band 2")
lowerband_2_plot = plot(lowerband_2, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Lower Band 2")
upperband_3_plot = plot(upperband_3, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Upper Band 3")
lowerband_3_plot = plot(lowerband_3, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Lower Band 3")
upperband_4_plot = plot(upperband_4, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Upper Band 4")
lowerband_4_plot = plot(lowerband_4, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Lower Band 4")
upperband_5_plot = plot(upperband_5, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Upper Band 5")
lowerband_5_plot = plot(lowerband_5, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Lower Band 5")
upperband_6_plot = plot(upperband_6, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Upper Band 6")
lowerband_6_plot = plot(lowerband_6, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Lower Band 6")
upperband_7_plot = plot(upperband_7, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Upper Band 7")
lowerband_7_plot = plot(lowerband_7, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Lower Band 7")
upperband_8_plot = plot(upperband_8, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Upper Band 8")
lowerband_8_plot = plot(lowerband_8, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Lower Band 8")
upperband_9_plot = plot(upperband_9, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Upper Band 9")
lowerband_9_plot = plot(lowerband_9, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Lower Band 9")
upperband_10_plot = plot(upperband_10, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Upper Band 10")
lowerband_10_plot = plot(lowerband_10, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Lower Band 10")
upperband_11_plot = plot(upperband_11, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Upper Band 11")
lowerband_11_plot = plot(lowerband_11, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Lower Band 11")
upperband_12_plot = plot(upperband_12, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Upper Band 12")
lowerband_12_plot = plot(lowerband_12, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Lower Band 12")
upperband_13_plot = plot(upperband_13, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Upper Band 13")
lowerband_13_plot = plot(lowerband_13, color=color.rgb(14, 139, 212, 95), linewidth=1, title="Lower Band 13")
upperband_14_plot = plot(upperband_14, color=color.rgb(14, 116, 212, 95), linewidth=1, title="Upper Band 14")
lowerband_14_plot = plot(lowerband_14, color=color.rgb(14, 139, 212, 95), linewidth=1, title="Lower Band 14")
// Plot fills for each length
fill(upperband_1_plot, lowerband_1_plot, color=fill_color, title="Fill 1")
fill(upperband_2_plot, lowerband_2_plot, color=fill_color, title="Fill 2")
fill(upperband_3_plot, lowerband_3_plot, color=fill_color, title="Fill 3")
fill(upperband_4_plot, lowerband_4_plot, color=fill_color, title="Fill 4")
fill(upperband_5_plot, lowerband_5_plot, color=fill_color, title="Fill 5")
fill(upperband_6_plot, lowerband_6_plot, color=fill_color, title="Fill 6")
fill(upperband_7_plot, lowerband_7_plot, color=fill_color, title="Fill 7")
fill(upperband_8_plot, lowerband_8_plot, color=fill_color, title="Fill 8")
fill(upperband_9_plot, lowerband_9_plot, color=fill_color, title="Fill 9")
fill(upperband_10_plot, lowerband_10_plot, color=fill_color, title="Fill 10")
fill(upperband_11_plot, lowerband_11_plot, color=fill_color, title="Fill 11")
fill(upperband_12_plot, lowerband_12_plot, color=fill_color, title="Fill 12")
fill(upperband_13_plot, lowerband_13_plot, color=fill_color, title="Fill 13")
fill(upperband_14_plot, lowerband_14_plot, color=fill_color, title="Fill 14")
// Add variables to store the highest upper band and lowest lower band values
var float highestUpperBand = na
var float lowestLowerBand = na
// Calculate the trueLevelUpperBand and trueLevelLowerBand
trueLevelUpperBand = max(upperband_1, max(upperband_2, max(upperband_3, max(upperband_4, max(upperband_5, max(upperband_6, max(upperband_7, max(upperband_8, max(upperband_9, max(upperband_10, max(upperband_11, max(upperband_12, max(upperband_13, upperband_14)))))))))))))
trueLevelLowerBand = min(lowerband_1, min(lowerband_2, min(lowerband_3, min(lowerband_4, min(lowerband_5, min(lowerband_6, min(lowerband_7, min(lowerband_8, min(lowerband_9, min(lowerband_10, min(lowerband_11, min(lowerband_12, min(lowerband_13, lowerband_14)))))))))))))
// Update the highest upper band and lowest lower band
highestUpperBand := highest(trueLevelUpperBand, 1)
lowestLowerBand := lowest(trueLevelLowerBand, 1)
// Store the upper and lower bands in an array for easy access
upperbands = array.new_float(14)
lowerbands = array.new_float(14)
array.set(upperbands, 0, upperband_1)
array.set(upperbands, 1, upperband_2)
array.set(upperbands, 2, upperband_3)
array.set(upperbands, 3, upperband_4)
array.set(upperbands, 4, upperband_5)
array.set(upperbands, 5, upperband_6)
array.set(upperbands, 6, upperband_7)
array.set(upperbands, 7, upperband_8)
array.set(upperbands, 8, upperband_9)
array.set(upperbands, 9, upperband_10)
array.set(upperbands, 10, upperband_11)
array.set(upperbands, 11, upperband_12)
array.set(upperbands, 12, upperband_13)
array.set(upperbands, 13, upperband_14)
array.set(lowerbands, 0, lowerband_1)
array.set(lowerbands, 1, lowerband_2)
array.set(lowerbands, 2, lowerband_3)
array.set(lowerbands, 3, lowerband_4)
array.set(lowerbands, 4, lowerband_5)
array.set(lowerbands, 5, lowerband_6)
array.set(lowerbands, 6, lowerband_7)
array.set(lowerbands, 7, lowerband_8)
array.set(lowerbands, 8, lowerband_9)
array.set(lowerbands, 9, lowerband_10)
array.set(lowerbands, 10, lowerband_11)
array.set(lowerbands, 11, lowerband_12)
array.set(lowerbands, 12, lowerband_13)
array.set(lowerbands, 13, lowerband_14)
// Get the selected bands for entry and exit
selected_entry_lowerband = array.get(lowerbands, entry_band - 1)
selected_exit_upperband = array.get(upperbands, exit_band - 1)
// Entry conditions
longCondition = crossover(macdLine, signalLine) or crossover(close, selected_entry_lowerband)
shortCondition = crossunder(macdLine, signalLine) or crossunder(close, selected_exit_upperband)
// Exit conditions
exitLongCondition = crossunder(macdLine, signalLine) or crossunder(close, selected_exit_upperband)
exitShortCondition = crossover(macdLine, signalLine) or crossover(close, selected_entry_lowerband)
// Strategy execution
strategy.entry("Long", strategy.long, when = longCondition)
strategy.entry("Short", strategy.short, when = shortCondition and long_and_short)
strategy.close("Long", when = exitLongCondition)
strategy.close("Short", when = exitShortCondition)