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

Re: [amibroker] Re: Event Date



PureBytes Links

Trading Reference Links

Hello Barry and all,

Every time the manual specifies a default value for the parameter 
(as in the case of ValueWhen(): valuewhen(EXPRESSION, ARRAY, n = 1) )
it means that this parameter can be omitted (and the default value is used then).

So if you type ValueWhen( high == alltimehigh, Month() );
it means that AmiBroker uses n = 1 (the default).

As for WriteVal() function: the second parameter is for formatting
- it is a floating point number specyfying minimum number of characters
to use for output (the integer part) and the number of decimal places (fractional part).

So WriteVal( close, 9.5)
will print close price using at least 9 characters (left space-padded if necessary)
and 5 decimal places.

Best regards,
Tomasz Janeczko
===============
AmiBroker - the comprehensive share manager.
http://www.amibroker.com


----- Original Message ----- 
From: <bholt@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, March 13, 2001 1:53 PM
Subject: [amibroker] Re: Event Date


> --- In amibroker@xxxx, "Tomasz Janeczko" <tj@xxxx> wrote:
> > Hello Barry,
> > 
> > Use the following formula to find the all-time highest and display 
> its value and date:
> > 
> > alltimehigh = LastValue( Highest( high ) );
> > alltimehighbar = ValueWhen( high == alltimehigh, Cum(1) );
> > 
> Tomasz: Valuewhen in the manual has a third term which I presume can 
> be omitted? Is this correct?
> > alltimeyear = ValueWhen( high == alltimehigh, Year() );
> > alltimemonth = ValueWhen( high == alltimehigh, Month() );
> > alltimeday = ValueWhen( high == alltimehigh, Day() );
> > 
> > "All time highest was " + WriteVal( alltimehigh );
> > "on the " + WriteVal( alltimeyear, 1 ) + "." + WriteVal( 
> alltimemonth, 1 ) + "." + WriteVal( alltimeday, 1 );
> > 
> Tomasz: You have added another term into the writeval function - 
> writeval(array,n). The manual hasn't got this in as far as I can 
> see. It appears to give a whole number instead of 3 decimal places. 
> Do we have any other choices? - other numbers don't appear to change 
> the outcome. Could you please update the manual if this is true.
> 
> > /* Draw also a vuy arrow on highest day */
> > buy = high == alltimehigh ;
> > sell = 0;
> > 
> > 
> > Best regards,
> > Tomasz Janeczko
> > ===============
> > AmiBroker - the comprehensive share manager.
> > http://www.amibroker.com
> > 
> > 
> > ----- Original Message ----- 
> > From: <bholt@xxxx>
> > To: <amibroker@xxxx>
> > Sent: Sunday, March 11, 2001 5:26 AM
> > Subject: [amibroker] Event Date
> > 
> > 
> > > Hi,
> > > 
> > > Could anybody please advise how to write the date of an event in 
> Guru 
> > > section - i.e. for the highest ever value of a stock.
> > > 
> > > I would like the commentary to say "The highest ever value was 
> > > $xxx.xx on the dd.mm.yyyy.
> > > 
> > > Thanks again in advance.
> > > 
> > > Thanks also to Richard for your explanation of how to combine 
> > > tickers - it worked well.
> > > 
> > > 
> > > 
> > > 
> > > 
> > > Your use of Yahoo! Groups is subject to 
> http://docs.yahoo.com/info/terms/ 
> > > 
> > >
> 
> 
> 
> 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
>