Hi all,
I am having difficulty with constructing this moving average.
1 If today’s close > today’s open, the volume is positive.
2 If today’s close < today’s open, volume is negative.
3 If today’s close = today’s open, volume is 0.
4 You then take the seven-day simple moving average of
the results.
I started off writing the if statements and came to a wall when these error messages came up saying I need to reference the array values. Do I need to use a do loop and access the array values individually make the comparison and make a new array before applying the moving average function ?
if( C > O )
{
v1 = V;
}
else {if (C < O) { v1= -V;} else {v1 = 0;}
};
Even if OBV() would use Close vs. Open comparison end result would still not output the same thing and it would still be rather large difference in results if simply putting MA() on OBV(). (OBV applies cummulative sum.)
Long story short... IMO, instead of prematurely claiming something it would be a better idea to validate claim via test before.
Out of curiosity. Do you have a colour code for your chart background. I like that colour and tried to make something similar but it was always either obviously grey or black. Perhaps it’s way it shows on discourse but it’s almost got a black/blue/grey thing going on. Easy on the eyes.
No, it is not because discourse. It uses a soft color gradient from top to bottom direction (see Tools-Preferences-Axes/Grids-Alternate background fill). It's kind of greenish. So being similar to chalkboard colors.
Anyway see screen color pickers to find out colors.