Tuesday, May 04, 2010
I’m trying to do a scan for a close above or below an 8 ema, but I want this to be on a weekly chart. Is there a way to code this or should I just do close > or < 40 ema.
Thank you.
Anon
Above8:= C > EMA(C,8);
Event: Above8
Chris White responded to "How to specify time frame for chart script formulas"
Tuesday, May 04, 2010 1:07 PM
Hi Anon,
It is possible to specify a weekly time frame if you are referencing another formula script.
So for example, there is a SystemIndicators.EMA script which takes the time period as a parameter and always uses the close price as the bar component.
Now you can reference this formula using:
Code: Select all
WeekEMA8: FML('EMA(8)#WEEK1');
Code: Select all
DayEMA40: EMA(C, 40);

Hope that helps,
Chris.