RicardoSantos

Function Highest/Lowest

7682 vizualizações
344
Function for highest() and lowest()
Notas de Lançamento: updated code for V4, code in cooperation with @LucF.
theres 2:
1. version that supports high length values.
2. error's with high length values, but maps initial range(bar_index=0 to length).
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Quer usar esse script no gráfico?

Comentários

500moeda
Resposta
This is great.. as I've noticed in version 3.. highest() and lowest() do not like taking in variables for length.. often results in:

line 34: Cannot call `highest` with arguments (series, series); available overloads: highest(series, integer) => series; highest(integer) => series;
+9 Resposta
These two pieces of code are probably the most used functions in Pine outside the built-ins, so thanks for them, Ricardo.
+4 Resposta
@LucF, discovered it today.... but was looking for them all my life. True story
+1 Resposta
I am trying to find a piece of code that will return the high since another function was true.
I was using highest(high,barssince(xyz>0)) but that doesn’t work because it’s two series. Is there a way to use the above to do the same thing? I only need it for the last 100 bars. If xyz>0 more than 100 bars ago then I don’t care what the high was. I can’t use highest(high,100) because xyz>0 could occur 3 bars ago but the high in the last 100 was 90 bars ago. Anyway any help appreciated
Resposta
is that possible to have similar improve cci() and dev() functions because
Cannot call 'cci' with arguments (series, series); available overloads: cci(series, integer) => series

Cannot call 'dev' with arguments (series, series); available overloads: dev(series, integer) => series

thanks in advance!
Resposta
... thank you sir. I was pulling my hair out here. Not because I couldn't write it, but just because I knew it was already written
Resposta
thanks for sharing
Resposta
A lowest()/highest() function without the ability to input a series is like a 3-legged horse. Thank you, Ricardo, for supplying the fourth leg!
Resposta
Thanks @RicardoSantos and @LucF, you guys are unstoppable!
Resposta
Início Rastreador de Fundamentos Rastreador Forex Rastreador de Criptomoedas Calendário Econômico Como Funciona Recursos gráficos Preços Indique um Amigo Regras da Casa Central de Ajuda Soluções para Sites & Corretoras Widgets Soluções em Gráficos Biblioteca de Gráficos Lightweight Blog & Notícias Twitter
Perfil Configurações de perfil Conta e Cobrança Amigos indicados Moedas Meus Tíquetes de Suporte Central de Ajuda Mensagens Privadas Conversa Deslogar