Reset Study value each day-need help
Posted: 14 Oct 2013
Is there an "easy" way to reset a study value to zero, so the study values are new on each day ?
For example I'd like this simple momentum study to begin at zero at the beginning of each day..(rather than carry over values from the previous day)...(I understand it will take 10 + bars to begin plotting each day...)...
For example I'd like this simple momentum study to begin at zero at the beginning of each day..(rather than carry over values from the previous day)...(I understand it will take 10 + bars to begin plotting each day...)...
Code: Select all
Input:Len(10);
vars:mom(0);
mom = c - average(c,Len);
plot1(mom,"momentum");