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

[amibroker] Re: Help with plots....



PureBytes Links

Trading Reference Links

Something like this perhaps (for pat1 only):

Cond1=C>Ref(C,-4);
Cond2=C<Ref(C,-4);
Pat1=Sum(Cond1,9)==9 AND Sum(Cond1,10)==9;
Pat2=Sum(Cond2,9)==9 AND Sum(Cond2,10)==9;
BarColor=IIf(Pat1,colorRed,IIf(Pat2,colorBrightGreen,colorBlack));

Plot(C,"close",BarColor,styleBar);

//Lowest lows of last 3 pat1
x=ValueWhen(pat1,LLV(L,9),1);
y=ValueWhen(pat1,LLV(L,9),2);
z=ValueWhen(pat1,LLV(L,9),3);
x1=LastValue(x);
y1=LastValue(y);
z1=LastValue(z);
Plot(x1,"",colorBrightGreen,styleLine);
Plot(y1,"",colorRed,styleLine);
Plot(z1,"",colorBlue,styleLine);

/JS




--- In amibroker@xxxxxxxxxxxxxxx, "Eugene" <johngalt1234@xxxx> wrote:
> Cond1=C>Ref(C,-4);
> Cond2=C<Ref(C,-4);
> Pat1=Sum(Cond1,9)==9 AND Sum(Cond1,10)==9;
> Pat2=Sum(Cond2,9)==9 AND Sum(Cond2,10)==9;
> BarColor=IIf(Pat1,colorRed,IIf(Pat2,colorBrightGreen,colorBlack));
> 
> Plot(C,"close",BarColor,styleBar);
> 
> perl=BarsSince(pat1);
> perh=BarsSince(pat2);
> LV=Ref(LLV(L,8),-perl);
> hv=ref(HHV(H,8),-perh);
> 
> The results obtained with LV and HV are correct in the first 
instance.
> 
> I am trying to plot horizontal lines for the last three 
occurrences 
> of each.
> 
> I have tried cutting and pasting from the code posted by Jayson 
with 
> no luck
> 
> Here is what I am trying to accomplish
> Locate the first consecutive 9 series of closes that are higher 
than 
> the close 4 days ago ----This works
> Find the highest(Lowest) during that 9 period...--- This works
> Plot a horizontal line at that level....doesnt work
> want to plot the lines for the last 3 occurrences....- doesnt work
> 
> Any help would be much appreciated.
> 
> TIA


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Free shipping on all inkjet cartridge & refill kit orders to US & Canada. Low prices up to 80% off. We have your brand: HP, Epson, Lexmark & more.
http://www.c1tracking.com/l.asp?cid=5510
http://us.click.yahoo.com/GHXcIA/n.WGAA/ySSFAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/