TradingView
Trendoscope
9 okt 2021 05:17

Run Timer 

Bitcoin / United States DollarCoinbase

Beskrivning

This is a simple utility which counts the number of bars and time elapsed after starting the script. This can be used in time or bars based conditions to modify script behavior.

This particular script does the following:
  • Starts timer when script is added to chart
  • Timer is green when starting and continues to be in green if the right Auth key is used in input (Which is hardcoded as 1234 here)
  • If right auth key is not provided in the input, timer background turns red after trial bars.


Script can be modified to use elapsed time instead.

Thanks to @Bjorgum on assisting on few calculations :)

Versionsinformation

Added key as interactive input.
Kommentarer
andre_007
Simple and efficient, thanks
Trendoscope
@andre_007, thanks. :)
Mer