Global/static variable

Posted By: RTG

Global/static variable - 01/30/23 00:08

To create and keep a weekly value (pivot point) and use that value for calculations on a daily timeframe, what should I do?

To date I have tried using the static variable but the value is 0 within the run() function. Should I post the code?
Posted By: AndrewAMD

Re: Global/static variable - 01/30/23 17:37

You know you have a new week when dow() returns a lower value than prior (MONDAY=1, FRIDAY=5). You'll also need a static value to remember the prior bar's day of the week.
https://zorro-project.com/manual/en/month.htm
© 2024 lite-C Forums