I didn't see a public script for drawing a cosine wave on the chart, with slight changes to RicardoSantos' Function Sine Wave Indicator, so I published this as my first script.
Thank-you, this solves a mystery for me simply by showing that n has been replaced with bar_index in version 4, which I was otherwise unable to find in the PineScript documentation!
rbower
⋅
Nice!
xmd1979
⋅
the most brilliant price to time series algo hack, thats the main thing on my trading setup bro, thank you very much for this )
LucienSchiffer
⋅
Using the extra _ before variables makes you feel fancy, doesn't it ?