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

Re: [amibroker] static object error



PureBytes Links

Trading Reference Links

Hello,

This is probably because you are calling "initialization" method unconditionally.
remember that CreateStaticObject creates object ONLY ONCE,
and all subsequent runs of the formula use object created PREVIOUSLY.
So your object initialization method call should also happen only ONCE.
TO ensure that use Static variables. (
if( NOT StaticVarGet("AlreadyInitialized") )
{
  yourobject.Init();
  StaticVarSet("AlreadyInitialized", True );
}

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "loveyourenemynow" <loveyourenemynow@xxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Friday, June 08, 2007 6:58 AM
Subject: [amibroker] static object error


> Hi,
> 
> I am creating a static object with CREATESTATICOBJECT, but when I use
> its inizialization method I get errors.
> If I create it with CREATEOBJECT I don't get the error but it is very
> slow.
> 
> Anyway to get around this?
> 
> Thank
> 
> Ly
> 
> 
> 
> 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
> 
> For other support material please check also:
> http://www.amibroker.com/support.html
> 
> Yahoo! Groups Links
> 
> 
> 
> 
>


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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/