PureBytes Links
Trading Reference Links
|
you need to expand the weekly values to match the daily bars (assuming
the base timeframe is daily).
TimeFrameSet (inWeekly);
LinRegChanSlope1w = LinRegSlope (Close, 23) ;
TimeFrameRestore ();
LinRegChanSlope1 = timeframeexpand(LinRegChanSlope1w,inweekly);
On 7/24/05, Tony Lei <yiupang91@xxxxxxxxx> wrote:
> Hi all,
>
> I wrote this code but it seems like the weekly criteria is not working very
> well. I want cond1 to include weekly channel sloping upward and cond2 to
> slope downwards. The reason why it doesn't work is because I did an
> exploration from 7/12 to 7/13 and stocks like CAT, AMGN appeared as short
> (cond2) but when I check the charts using the "look back" feature, the
> channel was trending upwards. Here is the code:
>
> TimeFrameSet (inWeekly);
> LinRegChanSlope1 = LinRegSlope (Close, 23) ;
>
> TimeFrameRestore ();
>
> Cond1 = (Cross (LinRegVal,EMAVal) OR LinRegVal > LinRegVal1 OR doublebottom)
> AND LinRegChanSlope1 > 0 AND reward1 >= 1 AND Ref (Close, -1) < LowerChanVal
> ;
> Cond2 = (Cross (EmaVal, LinRegVal) OR LinRegVal1 > LinRegVal OR doubletop)
> AND LinRegChanSlope1 < 0 AND reward2 >= 1 AND Ref (Close, -1) > UpperChanVal
> ;
>
> Any help is appreciated,
>
> thanks
>
> tony
> qitrader
>
>
> 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
>
>
>
>
> ________________________________
> YAHOO! GROUPS LINKS
>
> Visit your group "amibroker" on the web.
>
> To unsubscribe from this group, send an email to:
> amibroker-unsubscribe@xxxxxxxxxxxxxxx
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
> To unsubscribe from this group, send an email to:
> amibroker-unsubscribe@xxxxxxxxxxxxxxx
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
> ________________________________
>
--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
http://e-wire.net.au/~eb_kavan/ab_write.htm
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/DldnlA/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~->
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
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|