
پی پی او (PPO) قیمت حساسیت حرکیات بائنڈ ٹرانسمیشن ٹریڈنگ حکمت عملی ایک ٹریڈنگ حکمت عملی ہے جس میں قیمت حساسیت حرکیات اشارے کی شناخت کے لئے قیمت بائنڈ کی تشکیل کے رجحانات کی پیروی کی جاتی ہے۔ یہ پی پی او (PPO) اشارے کے بائنڈ تشکیل فیصلے اور قیمت کی حرکیات کی خصوصیت کے فیصلے کو جوڑتا ہے ، جس سے قیمت کے بائنڈ ٹرن آؤٹ پوائنٹ کی عین مطابق پوزیشن حاصل ہوتی ہے ، جس سے ٹریڈنگ سگنل پیدا ہوتا ہے۔
اس حکمت عملی میں پی پی او اشارے کا استعمال کیا گیا ہے تاکہ قیمت کی دوہری نچلی خصوصیات کا تعین کیا جاسکے ، جبکہ قیمت کے کم سے کم پوائنٹس کا تعین کیا گیا ہے ، اور پی پی او اشارے کی اصل وقت کی نگرانی کی گئی ہے کہ آیا اس میں نچلی خصوصیات موجود ہیں۔ جب پی پی او اشارے نیچے سے اوپر کی طرف الٹ دوہری شکل میں ظاہر ہوتا ہے تو ، اس کا اشارہ ہے کہ اس وقت خریدنے کا موقع ہے۔
دوسری طرف ، یہ حکمت عملی کم از کم قیمت کی تشخیص کے ساتھ کام کرتی ہے تاکہ یہ معلوم کیا جاسکے کہ آیا قیمت کم سطح پر ہے۔ جب قیمت کم ہوتی ہے تو ، اگر پی پی او اشارے میں نیچے کی علامت ہوتی ہے تو ، اس سے خریدنے کا اشارہ ملتا ہے۔
پی پی او اشارے کے الٹ پٹ کی خصوصیت کے فیصلے اور قیمت کی پوزیشن کی تصدیق کے دوہری فیصلے کے ذریعے ، قیمت کے الٹ پٹ کے مواقع کو مؤثر طریقے سے پہچانا جاسکتا ہے ، کچھ غلط سگنل کو فلٹر کیا جاسکتا ہے ، اور سگنل کی معیار کو بہتر بنایا جاسکتا ہے۔
پی پی او اشارے کی دوہری شکل کا استعمال کرتے ہوئے ، آپ کو خریدنے کے وقت کی جگہ کا تعین کرنے میں مدد ملتی ہے۔
قیمت کی پوزیشن کا تعین کرنے کے ساتھ مل کر ، اعلی پوائنٹس سے پیدا ہونے والے جعلی سگنل کو فلٹر کیا جاسکتا ہے ، جس سے سگنل کے معیار کو بہتر بنایا جاسکتا ہے۔
پی پی او اشارے حساس ہیں ، قیمتوں میں تبدیلی کے رجحان کو تیزی سے پکڑ سکتے ہیں ، اور رجحانات کی پیروی کرنے کے لئے موزوں ہیں۔
ڈبل تصدیق کے طریقہ کار کو اپنانے سے لین دین کے خطرات کو مؤثر طریقے سے کم کیا جاسکتا ہے۔
پی پی او اشارے جعلی سگنل پیدا کرنے کے لئے آسان ہے ، اس کی تصدیق کے لئے دوسرے اشارے کی ضرورت ہے۔ اس کی مدد کے لئے ایکویلیئن اشارے یا اتار چڑھاؤ کے اشارے شامل کیے جاسکتے ہیں۔
ڈبل نیچے الٹنا لازمی طور پر جاری نہیں رہتا ہے ، ایک بار پھر گرنے کا خطرہ ہے۔ اسٹاپ نقصان کی پوزیشن کو بہتر بنانے کے لئے اسٹاپ نقصان کا مقام طے کیا جاسکتا ہے۔
پیرامیٹرز کی غلط ترتیب سے رسک یا غلط خریداری کا خطرہ ہوسکتا ہے۔ پیرامیٹرز کے مجموعے کو بار بار جانچنے اور بہتر بنانے کی ضرورت ہے۔
بڑے پیمانے پر کوڈ، ماڈیولنگ جاری رکھنے کے لئے، کوڈ کی نقل کو کم کرنے کے لئے.
اسٹاپ نقصان ماڈیول شامل کریں اور پوزیشن مینجمنٹ کی حکمت عملی کو بہتر بنائیں۔
اوسط لائن کے اشارے یا اتار چڑھاؤ کے اشارے کی معاونت کی تصدیق شامل کریں۔
ماڈیولر کوڈ، بار بار فیصلے کی منطق کو کم کرنا
پیرامیٹرز کو بہتر بنانے اور استحکام کو بہتر بنانے کے لئے جاری رکھیں.
مزید اقسام کے اربیٹ ایپلی کیشنز کی جانچ پڑتال کریں۔
پی پی او قیمت حساسیت کی حرکیات بائنڈ ٹرانسمیشن ٹریڈنگ کی حکمت عملی پی پی او اشارے کی دو طرفہ خصوصیت کو پکڑنے کے ذریعے ، قیمت کی پوزیشن کے تعین کی دوہری تصدیق کے ساتھ مل کر ، قیمت کے الٹ پوائنٹس کی موثر پوزیشننگ کو حاصل کرتی ہے۔ اس میں ایک ہی اشارے کے فیصلے کے مقابلے میں زیادہ درست فیصلے کرنے اور شور کو فلٹر کرنے کا ایک بہترین فائدہ ہے۔ لیکن اس حکمت عملی میں کچھ غلط سگنل بھی موجود ہیں ، اشارے کے پورٹ فولیو کو بہتر بنانے کی ضرورت ہے ، اور سخت پوزیشن مینجمنٹ حکمت عملی کے ساتھ ، آپ مستحکم منافع کما سکتے ہیں۔
/*backtest
start: 2024-01-27 00:00:00
end: 2024-01-28 00:00:00
period: 2h
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/
// © luciancapdefier
//@version=4
strategy("PPO Divergence ST", overlay=true, initial_capital=30000, calc_on_order_fills=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// time
FromYear = input(2019, "Backtest Start Year")
FromMonth = input(1, "Backtest Start Month")
FromDay = input(1, "Backtest Start Day")
ToYear = input(2999, "Backtest End Year")
ToMonth = input(1, "Backtest End Month")
ToDay = input(1, "Backtest End Day")
start = timestamp(FromYear, FromMonth, FromDay, 00, 00) // backtest start window
finish = timestamp(ToYear, ToMonth, ToDay, 23, 59) // backtest finish window
window() => time >= start and time <= finish ? true : false
source = close
topbots = input(true, title="Show PPO high/low triangles?")
long_term_div = input(true, title="Use long term divergences?")
div_lookback_period = input(55, minval=1, title="Lookback Period")
fastLength = input(12, minval=1, title="PPO Fast")
slowLength=input(26, minval=1, title="PPO Slow")
signalLength=input(9,minval=1, title="PPO Signal")
smoother = input(2,minval=1, title="PPO Smooth")
fastMA = ema(source, fastLength)
slowMA = ema(source, slowLength)
macd = fastMA - slowMA
macd2=(macd/slowMA)*100
d = sma(macd2, smoother) // smoothing PPO
bullishPrice = low
priceMins = bullishPrice > bullishPrice[1] and bullishPrice[1] < bullishPrice[2] or low[1] == low[2] and low[1] < low and low[1] < low[3] or low[1] == low[2] and low[1] == low[3] and low[1] < low and low[1] < low[4] or low[1] == low[2] and low[1] == low[3] and low[1] and low[1] == low[4] and low[1] < low and low[1] < low[5] // this line identifies bottoms and plateaus in the price
oscMins= d > d[1] and d[1] < d[2] // this line identifies bottoms in the PPO
BottomPointsInPPO = oscMins
bearishPrice = high
priceMax = bearishPrice < bearishPrice[1] and bearishPrice[1] > bearishPrice[2] or high[1] == high[2] and high[1] > high and high[1] > high[3] or high[1] == high[2] and high[1] == high[3] and high[1] > high and high[1] > high[4] or high[1] == high[2] and high[1] == high[3] and high[1] and high[1] == high[4] and high[1] > high and high[1] > high[5] // this line identifies tops in the price
oscMax = d < d[1] and d[1] > d[2] // this line identifies tops in the PPO
TopPointsInPPO = oscMax
currenttrough4=valuewhen (oscMins, d[1], 0) // identifies the value of PPO at the most recent BOTTOM in the PPO
lasttrough4=valuewhen (oscMins, d[1], 1) // NOT USED identifies the value of PPO at the second most recent BOTTOM in the PPO
currenttrough5=valuewhen (oscMax, d[1], 0) // identifies the value of PPO at the most recent TOP in the PPO
lasttrough5=valuewhen (oscMax, d[1], 1) // NOT USED identifies the value of PPO at the second most recent TOP in the PPO
currenttrough6=valuewhen (priceMins, low[1], 0) // this line identifies the low (price) at the most recent bottom in the Price
lasttrough6=valuewhen (priceMins, low[1], 1) // NOT USED this line identifies the low (price) at the second most recent bottom in the Price
currenttrough7=valuewhen (priceMax, high[1], 0) // this line identifies the high (price) at the most recent top in the Price
lasttrough7=valuewhen (priceMax, high[1], 1) // NOT USED this line identifies the high (price) at the second most recent top in the Price
delayedlow = priceMins and barssince(oscMins) < 3 ? low[1] : na
delayedhigh = priceMax and barssince(oscMax) < 3 ? high[1] : na
// only take tops/bottoms in price when tops/bottoms are less than 5 bars away
filter = barssince(priceMins) < 5 ? lowest(currenttrough6, 4) : na
filter2 = barssince(priceMax) < 5 ? highest(currenttrough7, 4) : na
//delayedbottom/top when oscillator bottom/top is earlier than price bottom/top
y11 = valuewhen(oscMins, delayedlow, 0)
y12 = valuewhen(oscMax, delayedhigh, 0)
// only take tops/bottoms in price when tops/bottoms are less than 5 bars away, since 2nd most recent top/bottom in osc
y2=valuewhen(oscMax, filter2, 1) // identifies the highest high in the tops of price with 5 bar lookback period SINCE the SECOND most recent top in PPO
y6=valuewhen(oscMins, filter, 1) // identifies the lowest low in the bottoms of price with 5 bar lookback period SINCE the SECOND most recent bottom in PPO
long_term_bull_filt = valuewhen(priceMins, lowest(div_lookback_period), 1)
long_term_bear_filt = valuewhen(priceMax, highest(div_lookback_period), 1)
y3=valuewhen(oscMax, currenttrough5, 0) // identifies the value of PPO in the most recent top of PPO
y4=valuewhen(oscMax, currenttrough5, 1) // identifies the value of PPO in the second most recent top of PPO
y7=valuewhen(oscMins, currenttrough4, 0) // identifies the value of PPO in the most recent bottom of PPO
y8=valuewhen(oscMins, currenttrough4, 1) // identifies the value of PPO in the SECOND most recent bottom of PPO
y9=valuewhen(oscMins, currenttrough6, 0)
y10=valuewhen(oscMax, currenttrough7, 0)
bulldiv= BottomPointsInPPO ? d[1] : na // plots dots at bottoms in the PPO
beardiv= TopPointsInPPO ? d[1]: na // plots dots at tops in the PPO
i = currenttrough5 < highest(d, div_lookback_period) // long term bearish oscilator divergence
i2 = y10 > long_term_bear_filt // long term bearish top divergence
i3 = delayedhigh > long_term_bear_filt // long term bearish delayedhigh divergence
i4 = currenttrough4 > lowest(d, div_lookback_period) // long term bullish osc divergence
i5 = y9 < long_term_bull_filt // long term bullish bottom div
i6 = delayedlow < long_term_bull_filt // long term bullish delayedbottom div
//plot(0, color=gray)
//plot(d, color=black)
//plot(bulldiv, title = "Bottoms", color=maroon, style=circles, linewidth=3, offset= -1)
//plot(beardiv, title = "Tops", color=green, style=circles, linewidth=3, offset= -1)
bearishdiv1 = (y10 > y2 and oscMax and y3 < y4) ? true : false
bearishdiv2 = (delayedhigh > y2 and y3 < y4) ? true : false
bearishdiv3 = (long_term_div and oscMax and i and i2) ? true : false
bearishdiv4 = (long_term_div and i and i3) ? true : false
bullishdiv1 = (y9 < y6 and oscMins and y7 > y8) ? true : false
bullishdiv2 = (delayedlow < y6 and y7 > y8) ? true : false
bullishdiv3 = (long_term_div and oscMins and i4 and i5) ? true : false
bullishdiv4 = (long_term_div and i4 and i6) ? true : false
bearish = bearishdiv1 or bearishdiv2 or bearishdiv3 or bearishdiv4
bullish = bullishdiv1 or bullishdiv2 or bullishdiv3 or bullishdiv4
greendot = beardiv != 0 ? true : false
reddot = bulldiv != 0 ? true : false
if (reddot and window())
strategy.entry("Buy Id", strategy.long, comment="BUY")
if (greendot and window())
strategy.entry("Sell Id", strategy.short, comment="SELL")
alertcondition( bearish, title="Bearish Signal (Orange)", message="Orange & Bearish: Short " )
alertcondition( bullish, title="Bullish Signal (Purple)", message="Purple & Bullish: Long " )
alertcondition( greendot, title="PPO High (Green)", message="Green High Point: Short " )
alertcondition( reddot, title="PPO Low (Red)", message="Red Low Point: Long " )
// plotshape(bearish ? d : na, text='▼\nP', style=shape.labeldown, location=location.abovebar, color=color(orange,0), textcolor=color(white,0), offset=0)
// plotshape(bullish ? d : na, text='P\n▲', style=shape.labelup, location=location.belowbar, color=color(#C752FF,0), textcolor=color(white,0), offset=0)
plotshape(topbots and greendot ? d : na, text='', style=shape.triangledown, location=location.abovebar, color=color.red, offset=0, size=size.tiny)
plotshape(topbots and reddot ? d : na, text='', style=shape.triangleup, location=location.belowbar, color=color.lime, offset=0, size=size.tiny)
//barcolor(bearishdiv1 or bearishdiv2 or bearishdiv3 or bearishdiv4 ? orange : na)
//barcolor(bullishdiv1 or bullishdiv2 or bullishdiv3 or bullishdiv4 ? fuchsia : na)
//barcolor(#dedcdc)