[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




Yuki
 
Try this:
 

 
Title = Name() 
+" - "+ 
WriteVal( <FONT 
color=#0000ff size=2>DateTime(), formatDateTime 
)+" - "<FONT 
size=2>+"Open: "<FONT 
size=2>+WriteVal<FONT 
size=2>(O,1.0<FONT 
size=2>)+" "<FONT 
size=2>+" - Hi: "<FONT 
size=2>+WriteVal<FONT 
size=2>(H,1.0<FONT 
size=2>)+" "<FONT 
size=2>+" - Low: "<FONT 
size=2>+WriteVal<FONT 
size=2>(L,1.0<FONT 
size=2>)+" "<FONT 
size=2>+" - Close: "<FONT 
size=2>+WriteVal<FONT 
size=2>(C,1.0<FONT 
size=2>)+" - Volume: "<FONT 
size=2>+WriteVal<FONT 
size=2>(V,1);
 
F1=ValueWhen<FONT 
size=2>(H<Ref<FONT 
size=2>(H,-2) AND 
Ref(H,-<FONT 
color=#ff00ff size=2>1)<<FONT color=#0000ff 
size=2>Ref(H,-<FONT color=#ff00ff 
size=2>2) AND 
Ref(H,-<FONT color=#ff00ff 
size=2>3)<<FONT color=#0000ff 
size=2>Ref(H,-<FONT color=#ff00ff 
size=2>2) AND <FONT color=#0000ff 
size=2>Ref(H,-<FONT color=#ff00ff 
size=2>4)<<FONT color=#0000ff 
size=2>Ref(H,-<FONT color=#ff00ff 
size=2>2),<FONT color=#0000ff 
size=2>Ref(H,-<FONT color=#ff00ff 
size=2>2),<FONT color=#ff00ff 
size=2>1);
F2=ValueWhen<FONT 
size=2>(L>Ref<FONT 
size=2>(L,-2) AND 
Ref(L,-<FONT 
color=#ff00ff size=2>1)><FONT color=#0000ff 
size=2>Ref(L,-<FONT color=#ff00ff 
size=2>2) AND 
Ref(L,-<FONT color=#ff00ff 
size=2>3)><FONT color=#0000ff 
size=2>Ref(L,-<FONT color=#ff00ff 
size=2>2) AND <FONT color=#0000ff 
size=2>Ref(L,-<FONT color=#ff00ff 
size=2>4)><FONT color=#0000ff 
size=2>Ref(L,-<FONT color=#ff00ff 
size=2>2),<FONT color=#0000ff 
size=2>Ref(L,-<FONT color=#ff00ff 
size=2>2),<FONT color=#ff00ff 
size=2>1);
A=Cross(H,F1);
b=Cross(F2,L);
Buy=BarsSince<FONT 
size=2>(A)<BarsSince<FONT 
size=2>(b);
Sell =<FONT color=#0000ff 
size=2>BarsSince(A)><FONT color=#0000ff 
size=2>BarsSince(b);
Cover=Buy;
Short=S<FONT face="Courier New" 
size=2>ell;<FONT face="Courier New" color=#ff0000 
size=2>
//Buy=ExRem(Buy,Sell);<FONT 
face="Courier New" color=#ff0000 size=2>
//Sell=ExRem(Sell,Buy);<FONT 
face="Courier New" color=#ff0000 size=2>
//Cover=ExRem(Cover,Short);<FONT 
face="Courier New" color=#ff0000 size=2>
//Short=ExRem(Short,Cover); 

//X = Buy OR Sell OR Null;<FONT 
size=2>
barcolor=IIf<FONT 
face="Courier New" size=2>(Buy,colorGreen,<FONT face="Courier New" 
color=#0000ff size=2>IIf<FONT face="Courier New" 
size=2>(Sell,colorRed,colorBlack));
Plot(Close, "C: 
", <FONT face="Courier New" 
size=2>barcolor, styleBar);<FONT color=#0000ff 
size=2>
Plot(MA<FONT 
size=2>(C,18), 
"18-day SMA", 
colorRed, 4); 

<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  Yuki 
  Taga 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">Yuki Taga 
  Sent: Thursday, July 03, 2003 5:47 
  PM
  Subject: Re: FW: FW: [amibroker] price 
  plot help - Tomasz
  Can anyone show me the edit that will allow my beginning 
  price barsto be visible.  Right now they are invisible, since at the 
  beginningof the data neither condition in the code applies.  Oddly, 
  they matchmy background, and I cannot control this from 
  preferences.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)+"  -  Volume: 
  "+WriteVal(V,1);F1=ValueWhen(H<Ref(H,-2) AND 
  Ref(H,-1)<Ref(H,-2) AND Ref(H,-3)<Ref(H,-2) AND 
  Ref(H,-4)<Ref(H,-2),Ref(H,-2),1);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);A=Cross(H,F1);b=Cross(F2,L);Buy=BarsSince(A)<BarsSince(b);Short 
  =BarsSince(A)>BarsSince(b);Cover=Buy;Sell=Short;Buy=ExRem(Buy,Sell);Sell=ExRem(Sell,Buy);Cover=ExRem(Cover,Short);Short=ExRem(Short,Cover); 
  X = Buy OR Sell;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)), 
  styleBar);Plot(MA(C,18), "18-day SMA", colorRed, 
  4);Yuki
  Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 
  
<BLOCKQUOTE 
><FONT 
  face="Courier New">---Outgoing mail is certified Virus 
  Free.Checked by AVG anti-virus system (<A 
  href="">http://www.grisoft.com).Version: 6.0.495 
  / Virus Database: 294 - Release Date: 
6/30/2003






Yahoo! Groups Sponsor


  ADVERTISEMENT 









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 the Yahoo! Terms of Service.