Does any one have any experience in applying XAverage() to CloseW under a daily chart?
It seems the result of XAverage(CloseW) is very different to XAverage(Close) of Data2 (Data2=Weekly) under a daily chart.
For example:
Code: Select all
Vars: EMA_wk_Data2(0);
EMA_wk_Data2 = XAverage( Close, 20 ) data(2);
Plot1(EMA_wk_Data2, "EMA_wk_Data", CYAN);
SetPlotWidth(1, 4);
Vars: EMA_wk_CloseW(0);
EMA_wk_CloseW = XAverage( CloseW(0), 20 );
Plot2(EMA_wk_CloseW, "EMA_wk_CloseW", YELLOW);
SetPlotWidth(2, 4);
(1) When XAverage is applied to data2, it is only calculated once per week (As weekly data2 only has 1 value per week at close of Friday)
(2) When XAverage is applied to CloseW, there are 5 values across the 5 weekdays of the week.
Therefore XAverage(CloseW) will perform more frequent calculations, therefore produce this error/difference ? (Is this the case)
If so, how can I modify CloseW so that it will produce XAverageCloseW ? A quick example will be super awesome to get me started.
Thank you!