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

Re: [amibroker] Simple Problem?



PureBytes Links

Trading Reference Links

It seems to work fine.
Try this version with plots and a 5 bar holding period:

SMA = EMA( C, 21 );
LMA = EMA( C, 125 );
Cond1 = C < LMA;
Cond2 = Cross ( SMA, C );
Short = Cond1 AND Cond2;
Cover = BarsSince(Short)>=5;

Plot(C,"C",colorBlack,styleCandle);
Plot(SMA,"SMA",colorRed,styleLine);
Plot(LMA,"LMA",colorGreen,styleLine);
Plot(Cond1,"Cond1",colorRed,styleDots|styleOwnScale);
PlotShapes(Cond2*shapeDownArrow,colorPink);

You can see what is happening and when.

Thanks,
Howard



On 18 Mar 2007 03:42:45 -0700, cjandhnandh <chrisbizoz@xxxxxxxxx> wrote:

Hi all,

I am trying to code a short system with one of the conditions of the Buy
being C < 125 period EMA. This condition is being ignored in scans etc.

For example:

SMA = EMA( C, 21 );
LMA = EMA( C, 125 );
Cond1 = C < LMA;
Cond2 = Cross ( SMA, C );
Short = Cond1 AND Cond2;
Cover = 0;

Cond1 is completely ignored.

Can anyone confirm this or is it just me??

Thanks,

Chris


__._,_.___

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___