JayRogers

Example - HTF Values Without 'Security()'

JayRogers Atualizado   
This is an example of how to reference higher timeframe data without the
need for a 'security()' call.

I have attempted to create the function example:
f_insecurity()
with the purpose of wrapping up and pumping out all common relevent HTF
price data that's needed for your everyday indicators in a reliable fashion.
Notas de Lançamento:
  • Updated to remove potential repainting confusion with:
    security()
  • Added ability to toggle the security() comparison overlay on and off.

..apologies for any confusion regarding the previous repainting option, it was intended for debugging purposes only at the time of writing.

Cheers - Jay.
Notas de Lançamento:
  • Cleaned up self-referencing ternary operations - there was no need to reference 'previous' values of self, just 'active' self.
  • Added 'nz()' conversion checks where they might be necessary.
  • Removed redundant bar-counting mechanic.
  • Cleaned up some of the code comments.
Script de código aberto

Dentro do verdadeiro espírito TradingView, o autor deste script publicou ele como um script de código aberto, para que os traders possam compreender e checar ele. Um viva ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.

Quer usar esse script no gráfico?