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

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



PureBytes Links

Trading Reference Links

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