The question is how to retrieve the value of a certain indicator from one time frame to another.
I am working on a weekly system but i want to use the values of some parameters from daily time frame such as volume, turnover, index filter
is this the correct way to do it ?
Code:
TimeFrameSet(inDaily);
IndexSwitch = ParamToggle(“Index Filter”,”On|Off”,0);
IndexCode = ParamStr(“Index Code”,”$SPX”);
Index = Foreign(IndexCode,”C”);
IndMA = Param(“Index Filter MA Period”,100,1,1000,1);
IndexFilter = Index > MA(Index,IndMA) ;
IndexFilterDown = Index <= MA(Index,IndMA);
IndexFilt1 = IIf(IndexSwitch,1,IndexFilter);
TimeFrameRestore();
IndexFilt = TimeFrameCompress(IndexFilt1,inDaily);