ہلک پل بیک الٹ کی حکمت عملی

مصنف:چاؤ ژانگ، تاریخ: 2023-10-17 15:23:49
ٹیگز:

img

جائزہ

ہلک پل بیک ریورس ایک ایسی حکمت عملی ہے جو پل بیک مراحل کے دوران رجحان کی تبدیلیوں کی نشاندہی کرنے کے لئے حرکت پذیر اوسط ، ایم اے سی ڈی ، آر ایس آئی اور اے ڈی ایکس کا استعمال کرتی ہے۔ یہ خاص طور پر جارحانہ رجحان کے پیروکاروں کو نشانہ بناتی ہے ، جو ان کی عام پل بیک خصوصیات پر سرمایہ کاری کرتی ہے۔

حکمت عملی منطق

یہ حکمت عملی مجموعی رجحان کی سمت کا تعین کرنے کے ساتھ ساتھ طاقت / کمزوری کے علاقوں کی تعمیر کے لئے ای ایم اے کا استعمال کرتی ہے۔ جب قیمت طاقت سے کمزوری میں واپس آجاتی ہے تو ، حکمت عملی ممکنہ الٹ جانے کے مواقع کی نشاندہی کرتی ہے۔

غلط اندراجات کو فلٹر کرنے کے لئے ، ایم اے سی ڈی کو قلیل مدتی الٹ سگنل کی تصدیق کے لئے شامل کیا جاتا ہے۔ جب ایم اے سی ڈی کی مطلق قیمت ایک خاص حد سے تجاوز کرتی ہے تو ، الٹ جانے کا امکان بڑھ جاتا ہے۔ اے ڈی ایکس کو بھی ایک سطح سے اوپر ہونے کی ضرورت ہوتی ہے ، اس بات کو یقینی بنانا کہ مارکیٹ میں حد سے زیادہ رجحان ہے۔

آخر میں ، آر ایس آئی زیادہ خرید / زیادہ فروخت والے علاقوں سے بچنے کے لئے کام کرتا ہے۔ سگنل صرف اس وقت پیدا ہوتے ہیں جب آر ایس آئی کی اقدار ایک مقررہ حد کے اندر ہوتی ہیں۔

ای ایم اے کے ہر کراس اوور پر تجارت کی گنتی کو ری سیٹ کیا جاتا ہے۔ زیادہ سے زیادہ تجارت سے بچنے کے لئے کراس اوور پر زیادہ سے زیادہ تجارت کی حد بھی مقرر کی جاسکتی ہے۔

جب شرائط پوری ہوجاتی ہیں تو ، واپسی کی تجارت کو انجام دینے کے لئے اسٹاپ نقصان اور منافع لینے کے تناسب کی بنیاد پر آرڈر دیئے جاتے ہیں۔

فوائد کا تجزیہ

اس حکمت عملی کا سب سے بڑا فائدہ یہ ہے کہ طاقت / کمزوری کے علاقوں کی تعمیر کے لئے ای ایم اے کا استعمال کرتے ہوئے ، واپسی کے نمونوں پر فائدہ اٹھاتے ہیں۔ کثیر اشارے فلٹرنگ قابل اعتماد کو بہتر بناتا ہے۔

سنگل آسکیلیٹر اشارے کے مقابلے میں ، رجحان کا تعین شامل کرنے سے غیر ضروری الٹ جانے سے بچنے میں مدد ملتی ہے۔ ای ایم اے کراس اوور پر زیادہ سے زیادہ تجارت پر قابو پانے سے بھی زیادہ تجارت سے بچنے میں مدد ملتی ہے۔

خطرے کا تجزیہ

سب سے بڑا خطرہ اس وقت ہوتا ہے جب رجحان کے پیروکار واپس نہیں آتے ہیں ، براہ راست EMAs کو توڑتے ہیں۔ اس سے غلط سگنل پیدا ہوتے ہیں اور نقصانات کا سبب بنتے ہیں۔ نیچے کی طرف کنٹرول کرنے کے لئے اسٹاپ نقصانات کی ضرورت ہوتی ہے۔

اشارے کے ناقص پیرامیٹرز سگنل کے معیار کو بھی خراب کرسکتے ہیں۔ پیرامیٹرز کو بار بار جانچنے اور مختلف مارکیٹ کے حالات کے لئے بہتر بنانے کی ضرورت ہے۔

آخر میں ، بڑے پیمانے پر اسٹاپ نقصان اور الٹ جانے کے بعد مسلسل جارحیت ، ایک ہی تجارت کے نقصان کو بڑھا سکتی ہے۔ معقول اسٹاپ اور رسک مینجمنٹ ضروری ہیں۔

اصلاح کی ہدایات

حکمت عملی کو مندرجہ ذیل پہلوؤں میں بہتر بنایا جاسکتا ہے:

  1. مختلف مارکیٹوں اور پیرامیٹرز کا تجربہ کریں تاکہ ای ایم اے رجحان کو بہتر اندازہ کرسکیں۔

  2. زیادہ درست اور قابل اعتماد الٹ سگنل کے لئے MACD پیرامیٹرز کو بہتر بنائیں.

  3. RSI رینج کو ایڈجسٹ کریں تاکہ زیادہ سے زیادہ خریدنے / فروخت کی سطح سے بچنے کے لئے.

  4. اسٹاپ نقصان کو بہتر بنائیں اور منافع کے تناسب کو لے لو تاکہ واحد تجارت کے خطرے کو کم کیا جاسکے۔

نتیجہ

ہلک پل بیک ریورسنگ حکمت عملی خاص طور پر جارحانہ رجحان کے پیروکاروں کے پل بیک پیٹرن کو نشانہ بناتی ہے ، جس سے قلیل مدتی الٹ جانے کے مواقع کو مؤثر طریقے سے حاصل کیا جاسکتا ہے۔ یہ متعدد پرتوں والی رجحان کی سمت اور طاقت فلٹرنگ کے لئے ای ایم اے کا استعمال کرتا ہے ، اعلی وشوسنییتا کے اندراج کی تصدیق کے لئے ایم اے سی ڈی ، آر ایس آئی کے ساتھ۔ مناسب پیرامیٹر ٹیسٹنگ اور اصلاحات مارکیٹ کے مختلف ماحول میں موافقت کو قابل بناتی ہیں ، جس سے یہ ایک بہت ہی عملی رجحان الٹنے کی حکمت عملی بن جاتی ہے۔


/*backtest
start: 2023-09-16 00:00:00
end: 2023-10-16 00:00:00
period: 3h
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/
// © npietronuto1

//@version=5
strategy("Hulk Scalper x35 Leverage", shorttitle = "Smash Pullback Strat", overlay=true, initial_capital=100, default_qty_type=strategy.percent_of_equity, default_qty_value=100)


//------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//RSI
rsiLength = input.int(20)
RsiTopInput = input.int(2)
RsiBotInput = input.int(-2)

// toprsiLine = hline(RsiTopInput, title = "Rsi Top Line", linestyle = hline.style_solid)
// botrsiLine = hline(RsiBotInput, title = "Rsi Bottom Line", linestyle = hline.style_solid)

rsi = ta.rsi(close, rsiLength)
rsiWeighted = rsi - 50 //Zeros Rsi to look nicer


//------------------------------------------------------------------------------------------------------------------------------------------------------------------------

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------
adxlen = input(14, title="ADX Smoothing")
dilen = input(14, title="DI Length")
dirmov(len) =>
	up = ta.change(high)
	down = -ta.change(low)
	plusDM = na(up) ? na : (up > down and up > 0 ? up : 0)
	minusDM = na(down) ? na : (down > up and down > 0 ? down : 0)
	truerange = ta.rma(ta.tr, len)
	plus = fixnan(100 * ta.rma(plusDM, len) / truerange)
	minus = fixnan(100 * ta.rma(minusDM, len) / truerange)
	[plus, minus]
adx(dilen, adxlen) =>
	[plus, minus] = dirmov(dilen)
	sum = plus + minus
	adx = 100 * ta.rma(math.abs(plus - minus) / (sum == 0 ? 1 : sum), adxlen)
sig = adx(dilen, adxlen)

ADXfilterlevel = input.int(33, title = "ADX filter amount")

// plot(sig, color=color.red, title="ADX")
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//MACD
FastMacdLength = input.int(12, group = "MACD") 
SlowMacdLength = input.int(26, group = "MACD")
SignalLength = input.int(11, group = "MACD")
MacdTickAmountNeeded = input.float(5.45, title = "Tick Amount for entry", group = "MACD")

res = input.timeframe("1", group = "MACD")


// bullishgrow_col = input.color(defval = #3179f5)
// bullishweaken_col = input.color(defval = #00e1ff)
// bearishweaken_col = input.color(defval = #ff01f1)
// bearishgrow_col = input.color(defval = #9d00e5)


[FastMacd, SlowMacd, Macdhist] = ta.macd(close, FastMacdLength, SlowMacdLength, SignalLength)

//Pull MACD from Lower timeframe
MACD = request.security(syminfo.tickerid, res, Macdhist, gaps = barmerge.gaps_on)


//Grow and Fall Color
// getgrow_fall_col(Value) =>
//     if Value >= 0
    
//         if Value >= Value[1]
//             color.new(bullishgrow_col, transp = 10)
            
//         else if Value <= Value[1]
//             color.new(bullishweaken_col, transp = 10)
            
//     else if Value <= 0
    
//         if Value <= Value[1]
//             color.new(bearishgrow_col, transp = 10)
            
//         else if Value >= Value[1]
//             color.new(bearishweaken_col, transp = 10)
            
    
    
//CONDITIONS that check if MACD is overbought or oversold
MACDisAboveBand = MACD > MacdTickAmountNeeded
MACDisBelowBand = MACD < MacdTickAmountNeeded*-1
    
    
    
//Plot
// plot(MACD, style = plot.style_columns, color = getgrow_fall_col(MACD))
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------






//------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//EMAs
//Inputs
EmaFastLength = input.int(50, title = "Ema Fast Length")
EmaSlowLength = input.int(200, title = "Ema Slow Length")

StrongUpTrendCol = input.color(color.rgb(74, 255, 163))
//WeakUptrend = input.color(color.rgb(74, 255, 163, 50))
StrongDownTrendCol = input.color(color.rgb(255, 71, 84))
//WeakDownTrend = input.color(color.rgb(255, 71, 84, 50))

//Calculations


emaFast= ta.ema(close, EmaFastLength)

emaSlow= ta.ema(close, EmaSlowLength)

emaDist=emaFast-emaSlow
EmaLengthFraction = emaDist/4

emafrac5 = emaSlow + EmaLengthFraction
emafrac4 = emaSlow + EmaLengthFraction*2
emafrac3 = emaSlow + EmaLengthFraction*3
emafrac2 = emaSlow + EmaLengthFraction*4


UptrendCol_DowntrendCol= emaFast>=emaSlow ? StrongUpTrendCol:StrongDownTrendCol
//Plot
ema1p = plot(emaFast, color = color.new(#000000, transp = 100))
ema2p = plot(emafrac2, color = color.new(#000000, transp = 100))
ema3p = plot(emafrac3, color = color.new(#000000, transp = 100))
ema4p = plot(emafrac4, color = color.new(#000000, transp = 100))
ema5p = plot(emafrac5, color = color.new(#000000, transp = 100))
ema6p = plot(emaSlow, color = color.new(#000000, transp = 100))


fill(ema2p,ema3p, color = color.new(UptrendCol_DowntrendCol, 70))
fill(ema3p,ema4p, color = color.new(UptrendCol_DowntrendCol, 60))
fill(ema4p,ema5p, color = color.new(UptrendCol_DowntrendCol, 50))
fill(ema5p,ema6p, color = color.new(UptrendCol_DowntrendCol, 40))


//Conditons
FastEma_above_SlowEma = emaFast > emaSlow  
FastEma_below_SlowEma = emaFast < emaSlow

emaCrossEvent = ta.crossover(emaFast, emaSlow) or ta.crossover(emaSlow, emaFast)





//------------------------------------------------------------------------------------------------------------------------------------------------------------------------





//------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//Trade Cap per EMA X
//Inputs
MaxTrades_PerCross_Checkbox = input.bool(true, "Limit Trades Per Cross", group = "Filters")



TrdCount = 0//Variable that keeps current trade count

if(TrdCount[1] > 0)//Passes variable on to current candle
    TrdCount := TrdCount[1]
    
    
//Reset trade count if EMAs X    
emaXevent = ta.crossover(emaFast, emaSlow) or ta.crossover(emaSlow, emaFast) // Check for EMA cross
if(emaXevent)
    TrdCount := 0
    

//Conditions
MaxTrades = input.int(6)

IsMaxTrades_BelowCap = TrdCount[1] < MaxTrades //Condition that applies max trade count

if(not MaxTrades_PerCross_Checkbox)
    IsMaxTrades_BelowCap := true
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------




//------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//STRATEGY LOGIC

//Parameters
TakeProfitInput = input.float(0.0135, title = "Take Profit %", group = "TP/SL")
StopLossInput = input.float(0.011, title = "Stop Loss %", group = "TP/SL")


//TP/SL calculations
Long_takeProfit = close * (1 + TakeProfitInput)
Long_stopLoss = close * (1 - StopLossInput)

Short_takeProfit = close * (1 - TakeProfitInput)
Short_stopLoss = close * (1 + StopLossInput)


//LONG and Short
LongConditionPt1 = close > emaSlow and MACDisBelowBand and  sig > ADXfilterlevel
LongConditionPt2 = FastEma_above_SlowEma and IsMaxTrades_BelowCap and strategy.position_size == 0
//Checks if Rsi Inbetween Lines
LongConditionPt3 = rsiWeighted < RsiTopInput and rsiWeighted > RsiBotInput



ShortConditionPt1 = close < emaSlow and MACDisAboveBand and sig > ADXfilterlevel
ShortConditionPt2 = FastEma_below_SlowEma and IsMaxTrades_BelowCap and strategy.position_size == 0
//Checks if Rsi Inbetween Lines
ShortConditionPt3 = rsiWeighted < RsiTopInput and rsiWeighted > RsiBotInput





// longCondition = FastEma_above_SlowEma and MACDisBelowBand and IsMaxTrades_BelowCap and rsiWeighted < RsiTopInput and strategy.position_size == 0
longCondition = LongConditionPt1 and LongConditionPt2 and LongConditionPt3
if(longCondition)

    strategy.entry("long", strategy.long)
    strategy.exit("exit", "long", limit = Long_takeProfit, stop = Long_stopLoss)
    
    TrdCount := TrdCount + 1//ADD to Max Trades Count
    
    alert("Go Long with TP at" + str.tostring(Long_takeProfit) + "and SL at" + str.tostring(Long_stopLoss), alert.freq_once_per_bar_close)





shortCondition = ShortConditionPt1 and ShortConditionPt2 and ShortConditionPt3
if(shortCondition )
    
    strategy.entry("short", strategy.short)
    strategy.exit("exit", "short", limit = Short_takeProfit, stop = Short_stopLoss)

    TrdCount := TrdCount + 1 //ADD to Max Trades Count
    
    alert("Go Short with TP at" + str.tostring(Short_takeProfit) + "and SL at" + str.tostring(Short_stopLoss), alert.freq_once_per_bar_close)


    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    


مزید