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

RE: [amibroker] Re: How to add Plot Shapes at previous 52 week highs?



PureBytes Links

Trading Reference Links

Mo.

You don't need the loop, it's just slowing you down. 
Remove it and it still works. That's what array processing does for you!

Plot(C,Name(),colorBlack,styleCandle);
Buy_Requirement3 = IIf ( C > Ref ( HHV ( H, 250 ), -1 ), 1, 0 ); 
PlotShapes(shapeStar * Buy_Requirement3,colorBlue,0,C,0);
--
Terry

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
Behalf Of mo_means_go
Sent: Wednesday, June 28, 2006 09:40
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: How to add Plot Shapes at previous 52 week
highs?

Hi Terry,

I looked at your code a little closer and for loops and figured it
out.  The code is:

for( i = 1; i < BarCount; i++ ) 
{ 
    Buy_Requirement3 = IIf ( C > Ref ( HHV ( H, 250 ), -1 ), 1, 0 );
// daily scan
	PlotShapes(shapeStar * Buy_Requirement3,colorBlue,0,C,0);
} 


Thanks again for the help,

Mo.


--- In amibroker@xxxxxxxxxxxxxxx, "mo_means_go" <mo_means_go@xxx> wrote:
>
> Thanks Terry,
> 
> I see how to add a plot shape to the current 52 week high and that
> would show up as arrows on a scan anyway.  I want to see a plot shape
> on a 52 week high that may have happened 5 weeks ago for example. 
> That way I could skim a watchlist and see stocks that had pulled back
> from 52 week highs and started to turn back up without having to
> resort to a scan.  Something tells me I would have to do a loop with a
> lookback period set to the time frame I wanted to look back.  I'm not
> sure how to code the loop if that is required.
> 
> Thanks,
> 
> Mo.
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Terry" <MagicTH@> wrote:
> >
> > If you can find them in a scan you can plot them with the same code.
> > 
> > High_52 = your code to find them; //a True or False array
> > Plot(C,Name(),colorblack,stylecandle); //a graph to add shapes to
> > PlotShapes(ShapeStar * High_52,colorBlue,0,C,0);
> > --
> > Terry
> > -----Original Message-----
> > From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
On
> > Behalf Of mo_means_go
> > Sent: Tuesday, June 27, 2006 16:52
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] How to add Plot Shapes at previous 52 week
highs?
> > 
> > I would like to add some type of plot shape to my chart window that
> > will show all occurances of previous 52 week highs.  I know how to
> > scan for them, but how would I go about getting older highs labeled?

> > Any ideas?
> > 
> > Thanks,
> > 
> > Mo.
> >
>








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