Conversion de l’indicateur volatility oscillator de tradingview
Forums › ProRealTime forum Français › Support ProBuilder › Conversion de l’indicateur volatility oscillator de tradingview
- This topic has 3 replies, 2 voices, and was last updated 2 years ago by
HETrader.
Viewing 4 posts - 1 through 4 (of 4 total)
-
-
06/01/2022 at 3:26 PM #194434
Bonjour,
je souhaiterais avoir une conversion de ce code pour prorealtime il s’agit d’un indicateur de volatilité comme son nom l’indic
il sert a prend des mouvements quand il passe au dessus et en dessous de ces lignes bas/haut ( rouge – bleue ) photos jointes
merci voici le code123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107//@version=4study("Volatility Oscillator", resolution = "")length = input(100)spike = close - openx = stdev(spike,length)y = stdev(spike,length) * -1plot(spike, color = color.white, linewidth = 2, title = "Spike Linel")p1 = plot(x, "Upper Line")p2 = plot(y, "Lower Line")plot(0, color= color.gray, title= "Zero Line")plot(spike, color= color.blue, style=plot.style_area, transp=80, title = "Spike Fill")osc2 = spikelbR = 5lbL = 5rangeUpper =60rangeLower = 5plotBull = 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)delay_plot_til_closed = input(title="Delay diversion plot until candle is closed (don't repaint)", 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)repaint = (not(delay_plot_til_closed) or barstate.ishistory or barstate.isconfirmed)plFound = na(pivotlow(osc2, lbL, lbR)) ? false : truephFound = na(pivothigh(osc2, lbL, lbR)) ? false : true_inRange(cond) =>bars = barssince(cond == true)rangeLower <= bars and bars <= rangeUpper //------------------------------------------------------------------------------ // Regular Bullish // Osc: Higher Low oscHL = osc2[lbR] > valuewhen(plFound, osc2[lbR], 1) and _inRange(plFound[1])// Price: Lower LowpriceLL = low[lbR] < valuewhen(plFound, low[lbR], 1)bullCond = plotBull and priceLL and oscHL and plFound and repaintplotshape(bullCond ? osc2[lbR] : na,offset=-lbR,title="Regular Bullish Label",text="R",style=shape.labelup,location=location.absolute,color=bullColor,textcolor=textColor,transp=0)//------------------------------------------------------------------------------// Hidden Bullish// Osc: Lower LowoscLL = osc2[lbR] < valuewhen(plFound, osc2[lbR], 1) and _inRange(plFound[1]) // Price: Higher Low priceHL = low[lbR] > valuewhen(plFound, low[lbR], 1)hiddenBullCond = plotHiddenBull and priceHL and oscLL and plFound and repaintplotshape(hiddenBullCond ? osc2[lbR] : na,offset=-lbR,title="Hidden Bullish Label",text="H",style=shape.labelup,location=location.absolute,color=bullColor,textcolor=textColor,transp=0)//------------------------------------------------------------------------------// Regular Bearish// Osc: Lower HighoscLH = osc2[lbR] < valuewhen(phFound, osc2[lbR], 1) and _inRange(phFound[1]) // Price: Higher High priceHH = high[lbR] > valuewhen(phFound, high[lbR], 1)bearCond = plotBear and priceHH and oscLH and phFound and repaintplotshape(bearCond ? osc2[lbR] : na,offset=-lbR,title="Regular Bearish Label",text="R",style=shape.labeldown,location=location.absolute,color=bearColor,textcolor=textColor,transp=0)//------------------------------------------------------------------------------// Hidden Bearish// Osc: Higher HighoscHH = osc2[lbR] > valuewhen(phFound, osc2[lbR], 1) and _inRange(phFound[1])// Price: Lower HighpriceLH = high[lbR] < valuewhen(phFound, high[lbR], 1) hiddenBearCond = plotHiddenBear and priceLH and oscHH and phFound and repaint plotshape( hiddenBearCond ? osc2[lbR] : na, offset=-lbR, title="Hidden Bearish Label", text="H", style=shape.labeldown, location=location.absolute, color=bearColor, textcolor=textColor, transp=0 ) //barcolor(color = spike > 0 ? color.green : color.red )06/14/2022 at 8:53 AM #19524006/14/2022 at 9:08 AM #195242Ci-dessous le code de cet indicateur de volatilité (soit la taille du corps de la bougie courante, avec des bornes hautes et basses de l’écart type de période “length” de cette valeur).
12345//Volatility Oscillatorlength = 100spike = close - openx = std[length](spike)return spike,x,x*-106/14/2022 at 9:13 AM #195244 -
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
Find exclusive trading pro-tools on
Similar topics: