I'm trying to implement the following study in the Market Scanner,
but as we can see in the image attached, things aren't happening as expected
Code: Select all
//if CloseD(1) > 0 and CloseW(1) > 0 and CloseM(1) > 0 and CloseY(1) > 0 then
dROC = ((close / CloseD(1)) - 1) * 100;
wROC = ((close / CloseW(1)) - 1) * 100;
mROC = ((close / CloseM(1)) - 1) * 100;
yROC = ((close / CloseY(1)) - 1) * 100;
Plot1(dROC, "Daily ROC");
Plot2(wROC, "Weekly ROC");
Plot3(mROC, "Monthly ROC");
Plot4(yROC, "Yearly ROC");
Since I need a years data to plot the yearly ROC indicator, obviously I chose a years resolution. The problem appears to be the fact that I cannot plot daily, weekly and monthly ROC using that resolution.
Is it me or this makes no sence?
When plotting the same indicator on a chart all works perfectly.
Another question, that NetChg and Net%Chg is based on what? With that yearly resolution those values are not the year and even less the daily performance