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

Re: FW: FW: [amibroker] price plot help - Tomasz



PureBytes Links

Trading Reference Links

Hi Anthony,

Copied and pasted and applied, but absolutely no change in the
results.  First bars still blend to background color.

The only way I seem to be able to fix this is change the background
color, but that is exactly what I don't want to do.

BTW, thanks for the example anyway.  I didn't realize I could nest
IIF like that, which (I guess) gives the effect of if, then, else.

Yuki

Friday, July 4, 2003, 7:34:18 AM, you wrote:

AF> Try this:

AF> Title = Name() +" - "+ WriteVal( DateTime(), formatDateTime )+" - "+"Open: "+WriteVal(O,1.0)+" "+" - Hi: "+WriteVal(H,1.0)+" "+" - Low: "+WriteVal(L,1.0)+" "+" - Close: "+WriteVal(C,1.0)+" -
AF> Volume: "+WriteVal(V,1);



AF> F1=ValueWhen(H<Ref(H,-2) AND Ref(H,-1)<Ref(H,-2) AND 

AF> Ref(H,-3)<Ref(H,-2) AND Ref(H,-4)<Ref(H,-2),Ref(H,-2),1);

AF> F2=ValueWhen(L>Ref(L,-2) AND Ref(L,-1)>Ref(L,-2) AND 

Ref(L,-3)>>Ref(L,-2) AND Ref(L,-4)>Ref(L,-2),Ref(L,-2),1);

AF> A=Cross(H,F1);

AF> b=Cross(F2,L);

AF> Buy=BarsSince(A)<BarsSince(b);

AF> Sell =BarsSince(A)>BarsSince(b);

AF> Cover=Buy;

AF> Short=Sell;

AF> //Buy=ExRem(Buy,Sell);

AF> //Sell=ExRem(Sell,Buy);

AF> //Cover=ExRem(Cover,Short);

AF> //Short=ExRem(Short,Cover); 

AF> //X = Buy OR Sell OR Null;

AF> barcolor=IIf(Buy,colorGreen,IIf(Sell,colorRed,colorBlack));

AF> Plot(Close, "C: ", barcolor, styleBar);

AF> Plot(MA(C,18), "18-day SMA", colorRed, 4); 

AF>   ----- Original Message ----- 
AF>   From: Yuki Taga 
AF>   To: Yuki Taga 
AF>   Sent: Thursday, July 03, 2003 5:47 PM
AF>   Subject: Re: FW: FW: [amibroker] price plot help - Tomasz


AF>   Can anyone show me the edit that will allow my beginning price bars
AF>   to be visible.  Right now they are invisible, since at the beginning
AF>   of the data neither condition in the code applies.  Oddly, they match
AF>   my background, and I cannot control this from preferences.

AF>   Title = Name() +"  -  "+ WriteVal( DateTime(), formatDateTime )+"  -  "+"Open: "+WriteVal(O,1.0)+" "+" -  Hi: "+WriteVal(H,1.0)+" "+" -  Low: "+WriteVal(L,1.0)+" "+" -  Close:
AF> "+WriteVal(C,1.0)+"  -  Volume: "+WriteVal(V,1);


AF>   F1=ValueWhen(H<Ref(H,-2) AND Ref(H,-1)<Ref(H,-2) AND 
AF>   Ref(H,-3)<Ref(H,-2) AND Ref(H,-4)<Ref(H,-2),Ref(H,-2),1);
AF>   F2=ValueWhen(L>Ref(L,-2) AND Ref(L,-1)>Ref(L,-2) AND 
AF>   Ref(L,-3)>Ref(L,-2) AND Ref(L,-4)>Ref(L,-2),Ref(L,-2),1);

AF>   A=Cross(H,F1);
AF>   b=Cross(F2,L);

AF>   Buy=BarsSince(A)<BarsSince(b);
AF>   Short =BarsSince(A)>BarsSince(b);
AF>   Cover=Buy;
AF>   Sell=Short;

AF>   Buy=ExRem(Buy,Sell);
AF>   Sell=ExRem(Sell,Buy);
AF>   Cover=ExRem(Cover,Short);
AF>   Short=ExRem(Short,Cover); 

AF>   X = Buy OR Sell;

AF>   Plot( Close, Date() +"\n"+ "O: " + WriteVal( Open, 1.2 ) +"\n"+ "H: " + WriteVal(High, 1.2 ) +"\n"+ "L:  " + WriteVal( Low, 1.2 ) +"\n"+ "C: ", ValueWhen(X,IIf(Sell,colorRed,colorDarkGreen)),
AF> styleBar);

AF>   Plot(MA(C,18), "18-day SMA", colorRed, 4);

AF>   Yuki


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Save on Coral Calcium. Get Better Health and
Stronger Bones. Seen on TV
http://www.challengerone.com/t/l.asp?cid-2805&lp=calcium2.asp
http://us.click.yahoo.com/9gf46B/EfUGAA/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/