[RS]Renko ZigZag V0

Dilihat 5227 kali
Renko based zigzag:
  • mode: can be Traditional or ATR.
  • modeValue: can be whole number if you use ATR mode, or floating point number in case of Traditional mode.
  • showOverlay: displays basis Renko overlay.
Catatan Pelepasan: Update to version 3 - fixes some code that stopped working
Catatan Pelepasan: update to V4, added optional resolution to read atr range from a different timeframe.
Keluarkan daripada Skrip Pilihan Tambah kepada Skrip Pilihan



It doesn't show the "Traditional" mode? Could you know the reason why?
+2 Balas
RicardoSantos ForexKenya
@ForexKenya, its updated, works now
RicardoSantos, thanks for this indicator
I'm new to pinescript and can't quite figure it out how to port this to v4
I Kept getting erros like this for bricksize and ropen or rclose: "Value with NA type cannot be assigned to a variable that was defined without type keyword"

So I declared them as Var Float... and from that point stopped getting any errors, nonetheless I can't get the indicator to plot, can you help me?

This is what I've got so far:

mode = input('ATR', options=)
modeValue = input(14.000)
var float bricksize = na
if mode == "ATR"
bricksize := atr(round(modeValue))
if mode == "Traditional"
bricksize := modeValue

showOverlay = input(false)

var float ropen = na
var float propen = nz(ropen)
ropen := close > propen+bricksize or high > propen+bricksize ? propen+bricksize : close < propen-bricksize or low < propen-bricksize ? propen-bricksize : propen

var float rclose = na
rclose := ropen > propen ? ropen-bricksize : ropen < propen ? ropen+bricksize : nz(rclose)
var float direction = na
direction := ropen > propen ? 1 : ropen < propen ? -1 : nz(direction)

rc = direction == 1 ? color.green : direction == -1 ? color.maroon : na

p00 = plot(not showOverlay ? na : ropen, style=plot.style_cross, color=rc, linewidth=3)
p01 = plot(not showOverlay ? na : rclose, style=plot.style_circles, color=color.gray, linewidth=2)

fill(p00, p01, color=gray, transp=75)

// ||--> ZigZag:
var float extreme = na
prev_extreme = change(direction) != 0 ? ropen : fixnan(extreme)
extreme := direction == 1 and high >= prev_extreme ? high : direction == -1 and low <= prev_extreme ? low : prev_extreme
plot(change(direction) != 0 ? extreme : na)
@Unipin, updated to v4
Muito Bom! Thanks.
Well i guess what I'm asking if you look at your chart example here the candle with the high wick at a price of 11750 the zig zag there looks like it is telling you it hit a new high so i guess my question is there a lag with that zig zag or does it wait till the next 5 minute candle formation? Thank you for taking the time to answer my first question
yes its lagging by atleast 1 candle bar, can vary depending on distance to extreme since the swings are based on the range block swings and then capturing pivots when it changes
On this indicator Does the plot of the new high or new low get placed immediately or is it on the candle of the next time frame. If that makes any sense. ty
this does not repaint, if its what your asking?
Is there a way to backtest Renko scripts published in TradingView? I've been a fan of Renko, but new to TradingView.
Also, would be great to set up alerts on Renko reversal points
Laman Utama Penyaring Saham Penyaring Forex Penyaring Kripto Kalendar Ekonomi Bagaimana ia berfungsi Ciri-ciri Carta Harga Rujuk rakan Peraturan Dalaman Pusat Bantuan Laman web dan Penyelesaian Broker Widget Penyelesaian Pencartaan Perpustakaan Pencartaan yang Ringan Blog & Berita Twitter
Profil Tetapan Profil Akaun dan Pengebilan Rujuk rakan Tiket Sokongan Saya Pusat Bantuan Idea yang diterbitkan Pengikut Mengikuti Mesej Peribadi Sembang Daftar Keluar