fikira

Education -> varip / barstate.isnew

fikira Wizard Updated   
This is an educational script about varip

There are 3 lines:
- white line: when there is a new bar (barstate.isnew) the line will go from 0 to 1
at the first tick however it will fall to 0 again
- green line: when there is a new bar (barstate.isnew) this line will reset (go to 0)
from then it will count every tick on that bar
- yellow line: this line had a condition:
when the amount of ticks on this bar is 9 or more -> go to 9, otherwise, remain 0

Do mind, varip only works on live bars

https://www.tradingview.com/pine-script-reference/v5/#op_varip

Release Notes:
This script is part of a collection of educational scripts
If you want to return to the open source INDEX page, click here
-> Education: INDEX

LuxAlgo Dev: www.luxalgo.com
PineCoder: www.pinecoders.com

- We cannot control our emotions,
but we can control our keyboard -
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.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?