[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] TimeFrameSet question



PureBytes Links

Trading Reference Links

Ok, another AFL logic question . I'm trying to filter a MA crossover on a 30min chart by requiring that at the X-over the SAR() is below the low & the SAR() on the 15 minute chart is also below the low of the 15 TF. I've written the following but on checking the Sar30 & Sar15 variables they are the same. What have I ballsed up this time ?

MA7 = EMA(C,7);

MA21 = EMA(C,21);

MA55= EMA(C,55);

SAR30 = SAR();

TimeFrameSet(in15Minute);

SAR15 = SAR();

TimeFrameRestore();

SAR15= TimeFrameExpand(SAR15,in15Minute);

Min15 = TimeFrameGetPrice("L", in15Minute);

Buycond1 = MA50 > MA25 && Cross(MA10,MA50) AND SAR30 < L && SAR15 < Min15;//

Buy = Buycond1;

Filter = Buy ;

AddColumn( Buycond1, "buycond1", 1 );

AddColumn( L, "low", 1.4 );

AddColumn( Min15, "min15", 1.4 );

AddColumn( SAR30, "sar30", 1.4 );

AddColumn( SAR15, "sar15", 1.4 );



Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS