[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

Hiya , this is what you may need to do :
 
sHORT mOVING aVERGAES
SMA1
SMA2
SMA3
SMA4
SMA5 
SMA6
 
 
LONG MOVING AVERAGES
LMA1
LMA2
LMA3
LMA4
LMA5 
LMA6
 
i am not going to type the code as i do not know exactly yet but will give you some idea :
 
 
If
SMA1=SMA2=SMA3=SMA4=SMA5=SMA6
THEN  
LET X = 1
IF LMA1=LMA2=LMA3=LMA4
THEN
LET Y = 1
END IF
 
 
IF SMA1>SMA2>SMA3>SMA4>SMA5>SMA6 & X= 1
(FAN OUT IF SMALL MOVING AVERAGE 1 > SMA LL MOVING AVERAGE 2 ECT , AND X IS CALLED , X HAS BEEN TRIGGERED, IE ALL HAVE COME TOGETHER )
THEN
IF LMA1> LMA 2>LMA3 & Y=1
THEN
???
 
NOT TO SURE IF IT SHOULD BE LMA1>LMA2 OR OTHER WAY ROUND .
 
rEGARDS
 
mACOLM
 
 
On 11/23/05, original_nightstalker <nightstalker@xxxxxxxxxxx> wrote:
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.






------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/RvFikB/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/






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