What I'm trying to do:
Parameter= Days
General Coding:
int Days = 3 ; // this is my initial parameter already set up from wizard
double y= 1/2 * (High[Days]- Low[Days]) + Low[Days];
// this is my function
// My problem is that I don't know how to accumulate the y value based //on the parameter days total, as in if I wanted 4 to be my parameter
// I want the sumtotal y value for today, yesterday, yesterday-1 and //yesterday -2
//The while loop i tried to make didn't seem correct so I didn't include it
double Final= y/days; // this gives me the average based on the y
plot0.set(Final);
Thanks, Will
Comment