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

RE: [AmiBroker] YTD



PureBytes Links

Trading Reference Links




Brian, 

<FONT face=Arial color=#0000ff 
size=2>try
<FONT face=Arial color=#0000ff 
size=2> 

CG = C>0;
Filter = CG;
LastDates = Year()!= 
Ref(<FONT 
color=#0000ff size=1>Year(),<FONT color=#ff00ff 
size=1>1);
YrEndVal = Ref<FONT 
size=1>(ValueWhen<FONT 
size=1>(LastDates,C),-1<FONT 
size=1>);
YesterdayMA = Ref( 
MA( V, <FONT 
color=#ff00ff size=1>50 ), -<FONT color=#ff00ff 
size=1>1 );
AddColumn(C,<FONT color=#ff00ff 
size=1>"C");
AddColumn(C - YrEndVal ,<FONT color=#ff00ff 
size=1>"YTDChg");
AddColumn((C/YrEndVal-<FONT color=#ff00ff 
size=1>1)*100<FONT 
size=1> ,"YTDPctChg"<FONT 
size=1>);
AddColumn(C - <FONT color=#0000ff 
size=1>Ref(C,-<FONT color=#ff00ff 
size=1>5) ,<FONT color=#ff00ff 
size=1>"5DChg");
AddColumn((C/<FONT color=#0000ff 
size=1>Ref(C,-<FONT color=#ff00ff 
size=1>5)-1<FONT 
size=1>)*100 ,<FONT 
color=#ff00ff size=1>"5DPctChg");<FONT 
color=#0000ff size=1>
AddColumn(V - <FONT color=#0000ff 
size=1>Ref(V,-<FONT color=#ff00ff 
size=1>5) ,<FONT color=#ff00ff 
size=1>"5DVolChg");
AddColumn((V/<FONT color=#0000ff 
size=1>Ref(V,-<FONT color=#ff00ff 
size=1>5)-1<FONT 
size=1>)*100 ,<FONT 
color=#ff00ff size=1>"5DVolPctChg");<FONT 
color=#0000ff size=1>
AddColumn(C - <FONT color=#0000ff 
size=1>Ref(C,-<FONT color=#ff00ff 
size=1>1) ,<FONT color=#ff00ff 
size=1>"1DChg");
AddColumn((C/<FONT color=#0000ff 
size=1>Ref(C,-<FONT color=#ff00ff 
size=1>1)-1<FONT 
size=1>)*100 ,<FONT 
color=#ff00ff size=1>"1DPctChg");<FONT 
color=#0000ff size=1>
AddColumn(V - <FONT color=#0000ff 
size=1>Ref(V,-<FONT color=#ff00ff 
size=1>1) ,<FONT color=#ff00ff 
size=1>"1DVolChg");
AddColumn((V/<FONT color=#0000ff 
size=1>Ref(V,-<FONT color=#ff00ff 
size=1>1)-1<FONT 
size=1>)*100 ,<FONT 
color=#ff00ff size=1>"1DVolPctChg");<FONT 
color=#0000ff size=1>
AddColumn(Volume,<FONT color=#ff00ff 
size=1>"Volume");
AddColumn(YesterdayMA,<FONT color=#ff00ff 
size=1>"YesterdayMA");
<FONT face=Arial color=#0000ff 
size=2>Mr Valley

  <FONT face=Tahoma 
  size=2>-----Original Message-----From: Brian 
  [mailto:cadvantag@xxxxxxxxxxxxxx]Sent: Tuesday, December 09, 2003 
  6:46 PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] 
  YTDI am trying to get a exploration that calculates 
  the stocks total or loss year to date (YTD)I am using this 
  formulaYTD = ((EndValue(Close) - BeginValue(Close) * 100) / 
  BeginValue(Close);But I get an error and I don't know how to set 
  it to start on January 1 and calculate YTD.Can someone help 
  me.Thanks,BrianSend 
  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. 







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.