[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.

rd=Redline;

gn=Greenline;

rdgnV=99;rdgnmt=rdgnV/100;rdgnlt=100/rdgnV; 
rdgnsqz=rd>=rdgnmt*gn AND rd<rdgnlt*gn;

Plot(rdgnsqz,"rdgnsqz",colorRed,styleOwnScale);

RDGNV can be thought of as the RedGreenValue.  When the rdgnv is set at 99, 
the red and green lines need to be very close together to plot a hit.

If you change the rdgnv to 85, then it will detect  when the red and green 
lines  are a lot farther apart, but still fairly close to each other.

Change the rdgnv to value that you that you want to, and see what happens. 
Hope this helps. Ron D






----- Original Message ----- 
From: "original_nightstalker" <nightstalker@xxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Wednesday, November 23, 2005 2: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
>
>
>
>
>
> 



------------------------ 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/