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

Re: [amibroker] A Challenge for all you code wizards .....



PureBytes Links

Trading Reference Links

Try this for starters for a visual :
 

MaxGraph = 11;

/* Green lines */

Graph0= MA( Close, 3 );

Graph1= MA( Close, 5 );

Graph2= MA( Close, 7 );

Graph3 = MA( Close, 9 );

Graph4 = MA( Close, 11 );

Graph5 = MA( Close, 13 );

Graph0Style = Graph1Style = Graph2Style = Graph3Style =Graph4Style = Graph5Style = 1;

Graph0Color = Graph1Color = Graph2Color = Graph3Color =Graph4Color = Graph5Color = colorGreen;

/* red lines */

Graph6= MA( Close, 21 );

Graph7= MA( Close, 24 );

Graph8= MA( Close, 27 );

Graph9 = MA( Close, 30 );

Graph10 = MA( Close, 33 );

Graph11 = MA( Close, 36 );

Graph6Style = Graph7Style = Graph8Style = Graph9Style =Graph10Style = Graph11Style = 1;

Graph6Color = Graph7Color = Graph8Color = Graph9Color =Graph10Color = Graph11Color = colorBlue;

 

SQUEEZE=Cross(Graph4,Graph5)AND Graph5 < Graph6;

PlotShapes(SQUEEZE*shapeUpArrow,colorGreen);

----- Original Message -----
Sent: Wednesday, November 23, 2005 3:05 PM
Subject: [amibroker] A Challenge for all you code wizards .....

I'm using AB latest beta, v4.75.6 on XP.  And I have a challenge for you :)

I'd like to be able to scan for what I call a "Green Squeeze".  Using Guppy MMAs, the short term ones are coloured green, the longer term ones coloured red.  When the green MMAs come together - the Green Squeeze - then start to rise and fan out above the red MMAs, this is often an excellent early sign of a breakout.  I have a small .png file (SnagIt screen capture) of such a move, but don't know how to post graphics here.

The code for my MMAs pane in AmiBroker is as follows:

MaxGraph = 11;
/* blue lines */
Graph0= MA( Close, 3 );
Graph1= MA( Close, 5 );
Graph2= MA( Close, 7 );
Graph3 = MA( Close, 9 );
Graph4 = MA( Close, 11 );
Graph5 = MA( Close, 13 );
Graph0Style = Graph1Style = Graph2Style = Graph3Style =Graph4Style = Graph5Style = 1;
Graph0Color = Graph1Color = Graph2Color = Graph3Color =Graph4Color = Graph5Color = colorRed;

/* red lines */
Graph6= MA( Close, 21 );
Graph7= MA( Close, 24 );
Graph8= MA( Close, 27 );
Graph9 = MA( Close, 30 );
Graph10 = MA( Close, 33 );
Graph11 = MA( Close, 36 );
Graph6Style = Graph7Style = Graph8Style = Graph9Style =Graph10Style = Graph11Style = 1;
Graph6Color = Graph7Color = Graph8Color = Graph9Color =Graph10Color = Graph11Color = colorBlue;

NOW - the challenge:  How can I scan for the situation where the green MMAs start to emerge from a squeeze and start to fan out above the red MMAs?  The Green ones must be rising, they must be breaking above the topmost red one, and they must be starting to fan out (separate) over a few days - say 3 or 4 days for example.

As a non-coder, how can I incorporate those criteria into a scan?

The winner gets the honour of getting his/her name on the scan, and I'm sure that TJ would be happy to have it in the AFL library on the website... ;)

Any help much appreciated.

Regards,  NightStalker.






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