mikendo
Pine Script Rookie
Pine Script Rookie
Posts: 3
Joined: September 1st, 2022

is it possible to increment an EMA by a step of 0.1?

i'd like to be able to increment by 0.1 so i can adjust it in my input settings. Is it possible? Please have a look at my code and the output:

Image

https://ibb.co/yNqvxMv

processingclouds
Pine Script Master
Pine Script Master
Posts: 115
Joined: January 30th, 2022

Re: is it possible to increment an EMA by a step of 0.1?

Hey,

You misunderstand the second parameter, it is telling how many bars to look at. This has to be an integer value and not float.
So change input.float to input.int

Now your part on incrementing by 0.1 , what are you trying to increment?

Return to “Pine Script Q&A”