Convertir code range identifier et divergences tradingview vers prorealtime
Forums › ProRealTime forum Français › Support ProBuilder › Convertir code range identifier et divergences tradingview vers prorealtime
- This topic has 3 replies, 2 voices, and was last updated 4 years ago by graff.laetitia.
-
-
03/03/2020 at 10:19 AM #121042
Bonjour
Je suis toute nouvelle dans le codage , en vrais j’y comprend rien , j’ais beau essaye mais rien ne fonctionne , pourriez vous m’aider ? En fait un y aurais même 2 indicateur que je ne retrouve pas chez prorealtime , ils portent peut etre un autre nom !
Je souhaiterais avoir ces indicateurs sur prorealtime , je ne l’est pas trouver mais il y est sur tradingview
il y a ” Range Identifier [LazyBear] par LazyBear ” et le code tradingview est
12345678910111213141516171819202122//// @author LazyBear//////study("Range Identifier [LazyBear]", shorttitle="RID_LB", overlay=true)connectRanges=input(false, title="Connect Ranges")showMidLine=input(false, title="Show MidLine")lengthEMA=input(34, title="EMA Length")showEMA=input(true, title="Show EMA")hc=input(true, title="Highlight Consolidation")e=ema(close,lengthEMA)up = close<nz(up[1]) and close>down[1] ? nz(up[1]) : highdown = close<nz(up[1]) and close>down[1] ? nz(down[1]) : lowmid = avg(up,down)ul=plot(connectRanges?up:up==nz(up[1])?up:na, color=gray, linewidth=2, style=linebr, title="Up")ll=plot(connectRanges?down:down==nz(down[1])?down:na, color=gray, linewidth=2, style=linebr, title="Down")dummy=plot(hc?close>e?down:up:na, color=gray, style=circles, linewidth=0, title="Dummy")fill(ul,dummy, color=lime)fill(dummy,ll, color=red)plot(showMidLine?mid:na, color=gray, linewidth=1, title="Mid")plot(showEMA?e:na, title="EMA", color=black, linewidth=2)Et l’autre c’est ” Divergence Indicator ”
et le code c’est
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163//@version=4study(title="Divergence Indicator", format=format.price)len = input(title="RSI Period", minval=1, defval=14)src = input(title="RSI Source", defval=close)lbR = input(title="Pivot Lookback Right", defval=5)lbL = input(title="Pivot Lookback Left", defval=5)rangeUpper = input(title="Max of Lookback Range", defval=60)rangeLower = input(title="Min of Lookback Range", defval=5)plotBull = input(title="Plot Bullish", defval=true)plotHiddenBull = input(title="Plot Hidden Bullish", defval=false)plotBear = input(title="Plot Bearish", defval=true)plotHiddenBear = input(title="Plot Hidden Bearish", defval=false)bearColor = color.redbullColor = color.greenhiddenBullColor = color.new(color.green, 80)hiddenBearColor = color.new(color.red, 80)textColor = color.whitenoneColor = color.new(color.white, 100)osc = rsi(src, len)plot(osc, title="RSI", linewidth=2, color=#8D1699)hline(50, title="Middle Line", linestyle=hline.style_dotted)obLevel = hline(70, title="Overbought", linestyle=hline.style_dotted)osLevel = hline(30, title="Oversold", linestyle=hline.style_dotted)fill(obLevel, osLevel, title="Background", color=#9915FF, transp=90)plFound = na(pivotlow(osc, lbL, lbR)) ? false : truephFound = na(pivothigh(osc, lbL, lbR)) ? false : true_inRange(cond) =>bars = barssince(cond == true)rangeLower <= bars and bars <= rangeUpper//------------------------------------------------------------------------------// Regular Bullish// Osc: Higher LowoscHL = osc[lbR] > valuewhen(plFound, osc[lbR], 1) and _inRange(plFound[1])// Price: Lower LowpriceLL = low[lbR] < valuewhen(plFound, low[lbR], 1)bullCond = plotBull and priceLL and oscHL and plFoundplot(plFound ? osc[lbR] : na,offset=-lbR,title="Regular Bullish",linewidth=2,color=(bullCond ? bullColor : noneColor),transp=0)plotshape(bullCond ? osc[lbR] : na,offset=-lbR,title="Regular Bullish Label",text=" Bull ",style=shape.labelup,location=location.absolute,color=bullColor,textcolor=textColor,transp=0)//------------------------------------------------------------------------------// Hidden Bullish// Osc: Lower LowoscLL = osc[lbR] < valuewhen(plFound, osc[lbR], 1) and _inRange(plFound[1])// Price: Higher LowpriceHL = low[lbR] > valuewhen(plFound, low[lbR], 1)hiddenBullCond = plotHiddenBull and priceHL and oscLL and plFoundplot(plFound ? osc[lbR] : na,offset=-lbR,title="Hidden Bullish",linewidth=2,color=(hiddenBullCond ? hiddenBullColor : noneColor),transp=0)plotshape(hiddenBullCond ? osc[lbR] : na,offset=-lbR,title="Hidden Bullish Label",text=" H Bull ",style=shape.labelup,location=location.absolute,color=bullColor,textcolor=textColor,transp=0)//------------------------------------------------------------------------------// Regular Bearish// Osc: Lower HighoscLH = osc[lbR] < valuewhen(phFound, osc[lbR], 1) and _inRange(phFound[1])// Price: Higher HighpriceHH = high[lbR] > valuewhen(phFound, high[lbR], 1)bearCond = plotBear and priceHH and oscLH and phFoundplot(phFound ? osc[lbR] : na,offset=-lbR,title="Regular Bearish",linewidth=2,color=(bearCond ? bearColor : noneColor),transp=0)plotshape(bearCond ? osc[lbR] : na,offset=-lbR,title="Regular Bearish Label",text=" Bear ",style=shape.labeldown,location=location.absolute,color=bearColor,textcolor=textColor,transp=0)//------------------------------------------------------------------------------// Hidden Bearish// Osc: Higher HighoscHH = osc[lbR] > valuewhen(phFound, osc[lbR], 1) and _inRange(phFound[1])// Price: Lower HighpriceLH = high[lbR] < valuewhen(phFound, high[lbR], 1)hiddenBearCond = plotHiddenBear and priceLH and oscHH and phFoundplot(phFound ? osc[lbR] : na,offset=-lbR,title="Hidden Bearish",linewidth=2,color=(hiddenBearCond ? hiddenBearColor : noneColor),transp=0)plotshape(hiddenBearCond ? osc[lbR] : na,offset=-lbR,title="Hidden Bearish Label",text=" H Bear ",style=shape.labeldown,location=location.absolute,color=bearColor,textcolor=textColor,transp=0)Merci d’avance pour votre aide 🙂
03/03/2020 at 10:48 AM #121044Merci d’utiliser le formulaire dédié et de suivre les instructions pour toute demande de conversion de code vers ProRealTime. (la prochaine fois).
Pour les indicateurs de divergences, voir ces sujets et autres indicateurs dans la library:
https://www.prorealcode.com/topics-tag/divergences/
https://www.prorealcode.com/tag/divergences/
03/03/2020 at 10:50 AM #121045L’indicateur “range identifier” a été convertit en 2017 par bolsatrilera: https://www.prorealcode.com/topic/range-identifier/
03/03/2020 at 1:28 PM #121066Désoler , merci beaucoup , bonne journée 🙂
-
AuthorPosts
Find exclusive trading pro-tools on