PPK Tradingview
Forums › ProRealTime forum Français › Support ProBuilder › PPK Tradingview
- This topic has 29 replies, 4 voices, and was last updated 3 years ago by Nicolas.
-
-
12/18/2018 at 3:13 PM #87366
@Nicolas, je n’avais pas vue cette réponse concernant le dysfonctionnement du bouton [Insert PRT code] et les causes probables !
(le plus dommageable c’est qu’il n’est plus possible d’éditer une réponse une fois qu’elle a était enregistrée sur le forum) je suppose que c’est une question de sécurité !
12/18/2018 at 4:12 PM #8737203/29/2020 at 1:11 PM #123803bonjour a tous
je viens de découvrir cette indicateur PPK et j’ai une question sur les ronds de couleurs a qui ça correspond.
le rond rouge je suppose que c’est vendre et le rond vert , achat mais les autres ?
cordialement
05/05/2020 at 6:33 PM #130115Bonjour, Merci pour le travail fourni sur cet indicateur. Mais pourrions nous avoir quelques explications sur la signification des couleurs de points. Rouge et bleu(ou vert moi je le vois bleu) pour les retournements de tendances, je pense que c’est OK, mais pour les violets, orange etc…je ne vois pas. Merci a vous
05/10/2020 at 8:55 AM #130828Bonjour
Interessé également par l’interprétation des signaux délivrés par cet indicateur, même si il semble clair que les points rouge et bleu ciel signale des retournements de tendances, ils se trouvent au dessus des prix pour les points rouges (retournement à la baisse ) et en dessous des prix pour les bleus ciel ( retournement à la hausse ).
C’est moins limpide pour les signaux violet et or étant donné qu’ils se trouvent parfois au dessus et en dessous du prix voir même sur la même bougie.
Merci pour vos réponses
05/18/2020 at 5:43 PM #13218605/19/2020 at 5:14 PM #13230502/20/2021 at 12:49 PM #162097Bonjour,
Je me permets de relancer le sujet.
La version beta de PPK avait une fâcheuse tendance à repeindre.
Une nouvelle version est sortie et apparemment elle ne repeint plus.
Quelqu’un pourrait-il SVP convertir la version V3 de tradingview ?
Merci d’avance
Following changes have been made:
– fixed repainting with migration to pinescript version 3
– Added more smoothing options for all averages and the signal
– color is red and green in default123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201//@version=3study(title = “Pekipek’s PPO Divergence – EnhancedBy@PuppyTherapy”, shorttitle = “PP’s_PPO_DIV ByPuppyTherapy”)long_term_div = input(true, title=”Use long term Divergences?”)div_lookback_period = input(55, minval=1, title=”Lookback Period”)sp1 = input(“—-“, title=”———–FAST———-“, options=[“—-“])maType = input(“EMA”, title=”MA”, options=[“SMA”, “EMA”, “DEMA”, “TEMA”, “WMA”, “VWMA”, “SMMA”, “Hull”, “LSMA”, “ALMA”, “KAMA”, “MAMA”, “T3”, “RMA”], type=string)maSource = input(defval = open, title = “Source”, type = source)fastLength = input(defval = 12, title = “Period”, minval = 1)lsmaOffset = input(defval = 1, title = “Least Squares (LSMA) Only – Offset Value”, minval = 0)almaOffset = input(defval = 0.85, title = “Arnaud Legoux (ALMA) Only – Offset Value”, minval = 0, step = 0.01)almaSigma = input(defval = 6, title = “Arnaud Legoux (ALMA) Only – Sigma Value”, minval = 0)sp2 = input(“—-“, title=”———–SLOW———-“, options=[“—-“])maUseRes2 = input(defval = false, title = “Use Different Resolution?”)maReso2 = input(defval = “60”, title = “Set Resolution”, type = resolution)maType2 = input(“EMA”, title=”MA”, options=[“SMA”, “EMA”, “DEMA”, “TEMA”, “WMA”, “VWMA”, “SMMA”, “Hull”, “LSMA”, “ALMA”, “KAMA”, “MAMA”, “T3”, “RMA”], type=string)maSource2 = input(defval = open, title = “Source”, type = source)slowLength = input(defval = 26, title = “Period”, minval = 1)lsmaOffset2 = input(defval = 1, title = “Least Squares (LSMA) Only – Offset Value”, minval = 0)almaOffset2 = input(defval = 0.85, title = “Arnaud Legoux (ALMA) Only – Offset Value”, minval = 0, step = 0.01)almaSigma2 = input(defval = 6, title = “Arnaud Legoux (ALMA) Only – Sigma Value”, minval = 0)sp3 = input(“—-“, title=”———–D———-“, options=[“—-“])maTypeS = input(“SMA”, title=”MA”, options=[“SMA”, “EMA”, “DEMA”, “TEMA”, “WMA”, “VWMA”, “SMMA”, “Hull”, “LSMA”, “ALMA”, “KAMA”, “MAMA”, “T3”, “RMA”], type=string)lsmaOffset3 = input(defval = 1, title = “Least Squares (LSMA) Only – Offset Value”, minval = 0)almaOffset3 = input(defval = 0.85, title = “Arnaud Legoux (ALMA) Only – Offset Value”, minval = 0, step = 0.01)almaSigma3 = input(defval = 6, title = “Arnaud Legoux (ALMA) Only – Sigma Value”, minval = 0)smoother = input(2,minval=1,title = “Smoother”)///——FUNCTIONS//Function from @JayRogers thank you man awesome workkama(src, len)=>xvnoise = abs(src – src[1])nfastend = 0.666nslowend = 0.0645nsignal = abs(src – src[len])nnoise = sum(xvnoise, len)nefratio = iff(nnoise != 0, nsignal / nnoise, 0)nsmooth = pow(nefratio * (nfastend – nslowend) + nslowend, 2)nAMA = 0.0nAMA := nz(nAMA[1]) + nsmooth * (src – nz(nAMA[1]))mama(src, len)=>fl=0.5sl=0.05pi = 3.1415926sp = (4*src + 3*src[1] + 2*src[2] + src[3]) / 10.0p = 0.0i2 = 0.0q2 = 0.0dt = (.0962*sp + .5769*nz(sp[2]) – .5769*nz(sp[4])- .0962*nz(sp[6]))*(.075*nz(p[1]) + .54)q1 = (.0962*dt + .5769*nz(dt[2]) – .5769*nz(dt[4])- .0962*nz(dt[6]))*(.075*nz(p[1]) + .54)i1 = nz(dt[3])jI = (.0962*i1 + .5769*nz(i1[2]) – .5769*nz(i1[4])- .0962*nz(i1[6]))*(.075*nz(p[1]) + .54)jq = (.0962*q1 + .5769*nz(q1[2]) – .5769*nz(q1[4])- .0962*nz(q1[6]))*(.075*nz(p[1]) + .54)i2_ = i1 – jqq2_ = q1 + jIi2 := .2*i2_ + .8*nz(i2[1])q2 := .2*q2_ + .8*nz(q2[1])re_ = i2*nz(i2[1]) + q2*nz(q2[1])im_ = i2*nz(q2[1]) – q2*nz(i2[1])re = 0.0im = 0.0re := .2*re_ + .8*nz(re[1])im := .2*im_ + .8*nz(im[1])p1 = iff(im!=0 and re!=0, 2*pi/atan(im/re), nz(p[1]))p2 = iff(p1 > 1.5*nz(p1[1]), 1.5*nz(p1[1]), iff(p1 < 0.67*nz(p1[1]), 0.67*nz(p1[1]), p1))p3 = iff(p2<6, 6, iff (p2 > 50, 50, p2))p := .2*p3 + .8*nz(p3[1])spp = 0.0spp := .33*p + .67*nz(spp[1])phase = 180/pi * atan(q1 / i1)dphase_ = nz(phase[1]) – phasedphase = iff(dphase_< 1, 1, dphase_)alpha_ = fl / dphasealpha = iff(alpha_ < sl, sl, iff(alpha_ > fl, fl, alpha_))mama = 0.0mama := alpha*src + (1 – alpha)*nz(mama[1])t3(src, len)=>xe1_1 = ema(src, len)xe2_1 = ema(xe1_1, len)xe3_1 = ema(xe2_1, len)xe4_1 = ema(xe3_1, len)xe5_1 = ema(xe4_1, len)xe6_1 = ema(xe5_1, len)b_1 = 0.7c1_1 = -b_1*b_1*b_1c2_1 = 3*b_1*b_1+3*b_1*b_1*b_1c3_1 = -6*b_1*b_1-3*b_1-3*b_1*b_1*b_1c4_1 = 1+3*b_1+b_1*b_1*b_1+3*b_1*b_1nT3Average_1 = c1_1 * xe6_1 + c2_1 * xe5_1 + c3_1 * xe4_1 + c4_1 * xe3_1variant(type, src, len, lsmaOffset, almaOffset, almaSigma) =>v1 = sma(src, len) // Simplev2 = ema(src, len) // Exponentialv3 = 2 * v2 – ema(v2, len) // Double Exponentialv4 = 3 * (v2 – ema(v2, len)) + ema(ema(v2, len), len) // Triple Exponentialv5 = wma(src, len) // Weightedv6 = vwma(src, len) // Volume Weightedv7 = na(v5[1]) ? sma(src, len) : (v5[1] * (len – 1) + src) / len // Smoothedv8 = wma(2 * wma(src, len / 2) – wma(src, len), round(sqrt(len))) // Hullv9 = linreg(src, len, lsmaOffset) // Least Squaresv10 = alma(src, len, almaOffset, almaSigma) // Arnaud Legouxv11 = kama(src, len) // KAMAv12 = mama(src, len) // MAMAv13 = t3(src, len) // T3v14 = rma(src, len) // T3type==”EMA”?v2 : type==”DEMA”?v3 : type==”TEMA”?v4 : type==”WMA”?v5 : type==”VWMA”?v6 : type==”SMMA”?v7 : type==”Hull”?v8 : type==”LSMA”?v9 : type==”ALMA”?v10 : type==”KAMA”?v11 : type==”MAMA”?v12 : type==”T3″?v13 : type==”RMA”?v14 : v1///——FUNCTIONS//fastMA = ema(src, fastLength)fastMA = variant(maType, maSource, fastLength, lsmaOffset, almaOffset, almaSigma)//slowMA = ema(src, slowLength)slowMA = variant(maType2, maSource2, slowLength, lsmaOffset2, almaOffset2, almaSigma2)macd = fastMA – slowMAmacd2=(macd/slowMA)*100//d = sma(macd2, smoother) // smoothing PPOd= variant(maTypeS, macd2, smoother, lsmaOffset3, almaOffset3, almaSigma3)bullishPrice = lowpriceMins = bullishPrice > bullishPrice[1] and bullishPrice[1] < bullishPrice[2] orlow[1] == low[2] and low[1] < low and low[1] < low[3] orlow[1] == low[2] and low[1] == low[3] and low[1] < low and low[1] < low[4] orlow[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 priceoscMins= d > d[1] and d[1] < d[2] // this line identifies bottoms in the PPOBottomPointsInPPO = oscMinsbearishPrice = highpriceMax = bearishPrice < bearishPrice[1] and bearishPrice[1] > bearishPrice[2] orhigh[1] == high[2] and high[1] > high and high[1] > high[3] orhigh[1] == high[2] and high[1] == high[3] and high[1] > high and high[1] > high[4] orhigh[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 priceoscMax = d < d[1] and d[1] > d[2] // this line identifies tops in the PPOTopPointsInPPO = oscMaxcurrenttrough4=valuewhen (oscMins, d[1], 0) // identifies the value of PPO at the most recent BOTTOM in the PPOlasttrough4=valuewhen (oscMins, d[1], 1) // NOT USED identifies the value of PPO at the second most recent BOTTOM in the PPOcurrenttrough5=valuewhen (oscMax, d[1], 0) // identifies the value of PPO at the most recent TOP in the PPOlasttrough5=valuewhen (oscMax, d[1], 1) // NOT USED identifies the value of PPO at the second most recent TOP in the PPOcurrenttrough6=valuewhen (priceMins, low[1], 0) // this line identifies the low (price) at the most recent bottom in the Pricelasttrough6=valuewhen (priceMins, low[1], 1) // NOT USED this line identifies the low (price) at the second most recent bottom in the Pricecurrenttrough7=valuewhen (priceMax, high[1], 0) // this line identifies the high (price) at the most recent top in the Pricelasttrough7=valuewhen (priceMax, high[1], 1) // NOT USED this line identifies the high (price) at the second most recent top in the Pricedelayedlow = priceMins and barssince(oscMins) < 3 ? low[1] : nadelayedhigh = priceMax and barssince(oscMax) < 3 ? high[1] : na// only take tops/bottoms in price when tops/bottoms are less than 5 bars awayfilter = barssince(priceMins) < 5 ? lowest(currenttrough6, 4) : nafilter2 = barssince(priceMax) < 5 ? highest(currenttrough7, 4) : na//delayedbottom/top when oscillator bottom/top is earlier than price bottom/topy11 = 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 oscy2=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 PPOy6=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 PPOlong_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 PPOy4=valuewhen(oscMax, currenttrough5, 1) // identifies the value of PPO in the second most recent top of PPOy7=valuewhen(oscMins, currenttrough4, 0) // identifies the value of PPO in the most recent bottom of PPOy8=valuewhen(oscMins, currenttrough4, 1) // identifies the value of PPO in the SECOND most recent bottom of PPOy9=valuewhen(oscMins, currenttrough6, 0)y10=valuewhen(oscMax, currenttrough7, 0)bulldiv= BottomPointsInPPO ? d[1] : na // plots dots at bottoms in the PPObeardiv= TopPointsInPPO ? d[1]: na // plots dots at tops in the PPOi = currenttrough5 < highest(d, div_lookback_period) // long term bearish oscilator divergencei2 = y10 > long_term_bear_filt // long term bearish top divergencei3 = delayedhigh > long_term_bear_filt // long term bearish delayedhigh divergencei4 = currenttrough4 > lowest(d, div_lookback_period) // long term bullish osc divergencei5 = y9 < long_term_bull_filt // long term bullish bottom divi6 = delayedlow < long_term_bull_filt // long term bullish delayedbottom divplot(d, color=white)plot(bulldiv, title = “Tops”, color=green, style=circles, linewidth=4)//, offset= -1)plot(beardiv, title = “Bottoms”, color=red, style=circles, linewidth=4)//, offset= -1)plot(y10>y2 and oscMax and y3 < y4 ? d :na, title = “Bearish Divergence2”, color=orange, style= circles, linewidth=4)plot(y9<y6 and oscMins and y7 > y8 ? d :na, title = “Bullish Divergence2”, color=purple, style=circles, linewidth=4)plot(delayedlow<y6 and y7 > y8 ? d :na, title = “Bullish Divergence2”, color=purple, style=circles, linewidth=4)plot(delayedhigh>y2 and y3 < y4 ? d :na, title = “Bearish Divergence2”, color=orange, style= circles, linewidth=4)plot(long_term_div and oscMax and i and i2 ? d :na, title = “Bearish Divergence2”, color=orange, style= circles, linewidth=4)plot(long_term_div and oscMins and i4 and i5 ? d : na, title = “Bullish Divergence2”, color=purple, style=circles, linewidth=4)plot(long_term_div and i and i3 ? d :na, title = “Bearish Divergence2”, color=orange, style= circles, linewidth=4)plot(long_term_div and i4 and i6 ? d : na, title = “Bullish Divergence2”, color=purple, style=circles, linewidth=4)02/20/2021 at 1:04 PM #162099Utilisez toujours le bouton “Insert PRT Code” lorsque vous mettez du code dans vos messages pour faciliter la lecture par les autres.
Merci 🙂
02/20/2021 at 1:24 PM #162101Je prend note 🙂
03/16/2021 at 6:02 PM #16437503/17/2021 at 1:22 PM #16448403/19/2021 at 1:13 PM #164654Nicolas, j’ai observé très attentivement la version actuelle notamment en 30 secondes et en 1min, je t’assure qu’elle repeint énormément. C’est justement le point d’amélioration de la nouvelle version, l’auteur nous assurance qu’elle ne repeint plus.
03/23/2021 at 4:13 PM #16506003/23/2021 at 4:52 PM #165068Non, ça ne peut pas repeindre 🙂 Les informations du passé seront quoi qu’il arrive toujours conservées et jamais repeinte. Un signal calculé sur la bougie courante pourra toujours apparaître ou disparaître, si il est calculé avec le prix de fermeture (normal puisque la bougie n’est pas fermé), et c’est cas pour pour 90% des indicateurs, et ce n’est pas ce qu’on appelle “repeindre”. Ce qui se passe avec le code original sous TV, je ne sais pas, mais j’imagine qu’il peut en effet y avoir ce type de phénomène induit par le langage Pinescript.
-
AuthorPosts
Find exclusive trading pro-tools on