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

Re: [amibroker] Re: Question, wanting to display change in price instead of % change in price chart



PureBytes Links

Trading Reference Links




Graham and Jayson,
 
This feature was introduced in 4.35. Please note that WriteVal is still 
useful in some occassions (when you want to specify exactly the number of 
decimal places to display).
 
CHANGES FOR VERSION 
4.35.0 (as compared to 4.34.2)
  it is now allowed to 'add' (or rather concatenate) string to a number / 
  array. This saves quite a bit of typing. This works as in JScript. The 
  left-hand operand of '+' has to be a string. The right-hand operand may be 
  string, number or array. Numbers are coerced to strings using %g sprintf 
  formatting (prints out decimal point only when necessary) and then 
  concatenated. In case of arrays SELECTED VALUE is coerced to string and then 
  concatenated.So now instead of i = 100;"Value is " + 
  WriteVal( i );"Close : " + WriteVal( Close ) + ", Open : " + WriteVal( 
  Open ) + ", High : " + WriteVal( High );you can 
  write:i = 100;"Value is " + i;"Close : " + Close + ", 
  Open : " + Open + ", High : " + High;Note 
  that"Test " + 100 + 1;will give you "Test 1001" 
  because statements are parsed from left to right."Test " is added first to 
  "100" giving "Test 100" and then to "1" giving"Test 1001". If you want to 
  perform numeric adding first please use braces:"Test " + ( 100 + 
  1 );- this will give you "Test 101"
Hope this helps.
 
Best regards,Tomasz Janeczkoamibroker.com
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  Jayson 
  
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Thursday, August 14, 2003 7:07 
  AM
  Subject: RE: [amibroker] Re: Question, 
  wanting to display change in price instead of % change in price chart
  
  <SPAN 
  class=279460405-14082003>Think of all the keystrokes we will save!! I just 
  experimented and you can even do calculations with out the writeval() example 
  x+low. I guess we don't need writeval at all any more
   
  Regards, 
  Jayson 
  <FONT face=Tahoma 
  size=2>-----Original Message-----From: Graham 
  [mailto:gkavanagh@xxxxxxxxxxxxx]Sent: Wednesday, August 13, 2003 
  7:41 PMTo: <A 
  href="">amibroker@xxxxxxxxxxxxxxxSubject: 
  RE: [amibroker] Re: Question, wanting to display change in price instead of % 
  change in price chartI hadn't realised you could just 
  put the array variable into a title, alwayshad to use the WriteVal 
  function. Guess I should read the changes more 
  oftenCheers,Graham<A 
  href="">http://groups.msn.com/ASXShareTrading<A 
  href="">http://groups.msn.com/FMSAustralia-----Original 
  Message-----From: Tomasz Janeczko [mailto:amibroker@xxxxxx] Sent: 
  Thursday, 14 August 2003 7:30 AMTo: amibroker@xxxxxxxxxxxxxxxSubject: 
  Re: [amibroker] Re: Question, wanting to display change in priceinstead of 
  % change in price chartHello,One correction, since there 
  is a artitmetic operation inside stringconcatenation it must be wrapped 
  with parentheses as shown below:Plot( Close, "close", 5, 
  64);Title = Name() + " " + Date() + "Open: " + Open + " Hi: " 
  + High + " Lo: " + Low + " Close " + Close + " Change: " + ( Close - 
  Ref( Close, -1 ) ) + " Vol: " + Volume;Best regards,Tomasz 
  Janeczkoamibroker.com----- Original Message ----- From: "Tomasz 
  Janeczko" <amibroker@xxxxxx>To: 
  <amibroker@xxxxxxxxxxxxxxx>Sent: Thursday, August 14, 2003 1:25 
  AMSubject: Re: [amibroker] Re: Question, wanting to display change in 
  priceinstead of % change in price chart> Hello,> 
  > Just ADD IT AT THE END.> > Plot( Close, "close", 5, 
  64);> Title = Name() + " " + Date() + "Open: " + Open +>  " 
  Hi: " + High + " Lo: " + Low + " Close " + Close + >  " Change: " 
  + Close - Ref( Close, -1 ) + " Vol: " + Volume;> > Hope this 
  helps.> > Best regards,> Tomasz Janeczko> 
  amibroker.com> ----- Original Message -----> From: 
  "tagrant67214" <tagrant67214@xxxxxxxxx>> To: 
  <amibroker@xxxxxxxxxxxxxxx>> Sent: Thursday, August 14, 2003 1:20 
  AM> Subject: [amibroker] Re: Question, wanting to display change in 
  priceinstead of % change in price chart> > > > 
  Thanks,> > > > I can't manage to find an example of how to 
  do this on the on-line> > afl reference.  I'm not a programmer 
  so I have no clue what the heck > > I'm doing here. > > 
  > > Where would I put this in the formula editor on this  
  example.> > > > Plot( Close, "close", 5, 64);> > 
  > > the variation's I've tried all error out.> > > 
  > Thanks,> > > > Todd> > --- In 
  amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxxx>> 
  > wrote:> > > Hello,> > > > > > 
  Simply add this to your custom chart:> > > > > > 
  Title = Name() + " " + Date() + "Open: " + Open +> > > " Hi: " + 
  High + " Lo: " + Low + " Close " + Close + > > > " Change: " + 
  Close - Ref( Close, -1 ) + " Vol: " + Volume;> > > > > 
  > > > > Hope this helps.> > > > > > 
  Best regards,> > > Tomasz Janeczko> > > 
  amibroker.com> > > ----- Original Message -----> > > 
  From: "tagrant67214" <tagrant67214@xxxx>> > > To: 
  <amibroker@xxxxxxxxxxxxxxx>> > > Sent: Thursday, August 14, 
  2003 12:38 AM> > > Subject: [amibroker] Question, wanting to 
  display change in price > > instead of % change in price 
  chart> > > > > > > > > > 
  Hello,> > > > > > > > On the default chart or 
  a custom chart, at the top it returns> > > > > > 
  > > The symbol, date, open, hi, lo, close (+ or - %) and volume.> 
  > > > > > > > I would like to know how I can make it 
  show the change in price,> > > > instead of the change in 
  percent.> > > > > > > > > > > 
  > Thanks,> > > > > > > > Todd> > 
  > > > > > > > > > > > > > 
  > > > > > Send BUG REPORTS to bugs@xxxx> > > 
  > Send SUGGESTIONS to suggest@xxxx> > > > 
  -----------------------------------------> > > > 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> > <A 
  href="">http://docs.yahoo.com/info/terms/> 
  > > > > > > > > > > >> > 
  > > > > > > Send BUG REPORTS to 
  bugs@xxxxxxxxxxxxx> > Send 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 > 
  > <A 
  href="">http://docs.yahoo.com/info/terms/> 
  > > > > > > > > Send BUG REPORTS 
  to bugs@xxxxxxxxxxxxx> Send 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 > <A 
  href="">http://docs.yahoo.com/info/terms/> 
  > > ------------------------ Yahoo! Groups Sponsor 
  ---------------------~--> BuyInk Cartridges or Refill Kits for Your HP, 
  Epson, Canon or Lexmark Printerat Myinks.com. Free s/h on orders $50 or 
  more to the US & Canada.<A 
  href="">http://www.c1tracking.com/l.asp?cid=5511<A 
  href="">http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/GHeqlB/TM---------------------------------------------------------------------~->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 <A 
  href="">http://docs.yahoo.com/info/terms/ 
  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. 
  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. 







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.