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

[amibroker] Why is "Title" breaking in some places, but not others?



PureBytes Links

Trading Reference Links

Hi,

 

I’m using the following code to add the Linear Regression Slope to the Title. 


Title = Title +
"\n" + EncodeColor(colorWhite) + "LR Slope:    " + NumToStr(Ref(LinRegSlope( p, Daysback ), -shift) );

 

This works nicely in my top pane and adds LR Slope to the Title.  

 

However, when I add it to other panes, I get an error, “Error 29, Variable ‘title’ used with having been initialized.” and several, “Error 1.  Operation not allowed.  Operator/Operand type mismatch.

 

I tried simplifying the statement to:

 

Title = Title + "foo";

 

I still got Error 29 and Error 1.

 

Then I tried:

 

Title = Title + 555;

 

Error 1 disappeared, but I still got Error 29.

 

I’d appreciate any help.   Is this a bug?   Dumb operator error?   AB idiosyncrasy?    

 

Regards,

 

Dan.

 

 

Note - The Parameters Section is:

P = ParamField("Price field",-1);
Daysback =
Param("Period for Liner Regression Line",21,1,240,1);
shift =
Param("Look back period",0,0,240,1);

 



Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





YAHOO! GROUPS LINKS