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

Re: [amibroker] Number of Days between dates



PureBytes Links

Trading Reference Links

Bill,

DateTime(0 is encoded date/time in special format that allows display
both date and time according to your system settings.
It has nothing to do with bar index.

To get the period use

Period = EndValue( BarIndex() ) - BeginValue( BarIndex() );

Second question:

Use C-like \n escape sequence (backslash and small n)

Title = "First line\nSecond line";


Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: <wbarack@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, February 16, 2003 5:28 PM
Subject: [amibroker] Number of Days between dates


> I am trying out 4.29.1 and its wonderful new functions that let me 
> select a from-to range on a price plot. Thanks Tomasz. Great addition.
> 
> What I want to do is calculate a standard deviation over the selected 
> range. While the example for "percentage change" in price that is 
> included withe download works great, the standard deviation function, 
> like many others, wants to know the period to be calcated over.
> 
> StDev(array, period);
> 
> So I am trying to find the period as follows:
> 
> Range (or period) = EndValue(Datetime())-BeginValues(DateTime());
> 
> however, this expression and the variants of it that I have tried 
> results in error messages when I try to write the value of StDev in a 
> Title expression.
> 
> I'm sure I messing up formats or something similar and I cannot find 
> the Help descriptions that will get me out of my dilema.
> 
> Long winded, but the basic question is: "How do I find the range 
> in "bars" for a given From-to range such that I can use it in 
> functions like StDev?"
> 
> Second associated question: "How do I direct the Title function to 
> execute a carriage return?"
> 
> Thanks
> 
> Bill
> 
> 
> 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/ 
> 
> 
> 

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/