Forums ProRealTime English forum ProOrder support First try to code a strategy Reply To: First try to code a strategy

#96429

I saw that there is a built-in indicator called ‘change’ that displays the percentage variation between the close and yesterdays close. When I use the simplified creation in PRT and click the ‘change’ indicator window the code  uses a function called variable. Out of curiosity and for learning purposes I was wondering how I can use this in my code instead of your first suggestion:

Lets say I want that the percentagechange today should be equal to the highest percenagechange in 2 days. Measured close to close.

Is it possible to write this using the ‘variation’ function?