Hi
I want to use my version of ATR, which is calculated using loops and has
numeric type, in different time frame. Therefore I need to utizize
TimeFrameExpand. However, this function seems not to recognize this data. I
guess that it's neccessary to convert numeric type data creating my indicator
into array type. Probably it's very simple and dump issue, but still to
difficult for me..How to do this?
For you convenience I'm enclosing the code of my ATR:
k=20;
for(i=2;i<BarCount;i++)
{
m[i]=Max(abs(C[i-2]-H[i-1]),abs(C[i-2]-L[i-1]));
tr[i]=Max(H[i-1]-L[i-1],m[i]);
}
watr_p[0]=0;
for(i=2;i<k+2;i++)
{
watr_p[i]=tr[i]+watr_p[i-1];
}
watr[0]=0;
watr[k+1]=watr_p[k+1]/k;
for(i=k+2;i<BarCount;i++)
{
watr[i]=((k-1)*watr[i-1]+tr[i])/k;
}