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

[amibroker] Re: AddColumn vs NumColumn & ColumnX=



PureBytes Links

Trading Reference Links

Tomasz,

Once again, I have run into the limits of my knowledge.

The following code is what precipitate my original question. The 
addcolumn example you gave below works just fine. However, If I try 
to do the variable PerChange, I run into an error message that I 
don't know how to fix. BTW, it works ok if I use 
the "NumColumns/ColumnX=" approach.

So my first thought was that it was the array/scalar difference that 
was causing the problem. But apparently not.

Can you help me with the difference as to why addcolumn isn't working 
here. Its something I haven't yet figured out.

Thanks

Bill

--------------------
Filter = 1; 

DateSpan = EndValue(BarIndex()) - BeginValue(BarIndex());
Range = DateSpan ;

PerChange = WriteVal(100*(EndValue(Close)-BeginValue
(Close))/BeginValue(Close));

SD = (StDev(Close,Range));

SDPerCent = (StDev(((Close/Ref(Close,-1))-1)*100,Range)*((Range)/
(Range-1))^.5);

Title ="Percentage change of close is                              " 
+ PerChange + "%, \nStandard Deviation of actual price change over 
the period is   " + WriteVal(EndValue(SD)) + "\nDaily Std Dev of % 
Price Change over the period is  " + WriteVal(EndValue(SDPerCent))
+ "\nMonthly Std Dev of % Price Change over the period is  " + 
WriteVal(EndValue(SDPerCent*(21)^.5));
/*NumColumns = 2;
Column0 = PerChange;
Column1 = SD;
Column0Name = "% Price";
Column1Name = "P StD";*/
AddColumn(7,"7");
AddColumn( SDPerCent, "SDPerCent" );
AddColumn(PerChange,"% Change");
AddColumn(SD,"SD");

---------------

--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxxx> 
wrote:
> Bill,
> 
> AddColumns works both with Number and arrays.
> Filter=1;
> AddColumn( 7, "Just 7" );
> 
> (please do not use numcolumns variable if you use AddColumns 
function)
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message ----- 
> From: <wbarack@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Thursday, February 20, 2003 3:58 PM
> Subject: [amibroker] AddColumn vs NumColumn & ColumnX=
> 
> 
> > In trying the different commnands above, it seems as though the 
> > AddColumn commnand only works with arrays. And if I calculate a 
> > scalar that I want to display in my Exploration, I need to use 
the 
> > NumColumns/ColumnX= approach.
> > 
> > Is this a correct interpretation on my part.
> > 
> > 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/