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

[amibroker] Re: Access Error when trying to VarGet from within a VarSet loop



PureBytes Links

Trading Reference Links

Thanks. I have sent the crash report to bugs_at_amibroker.com

Hopefully you can spot what is wrong. The AFL syntax checker indicates no errors in the code, and I certainly cannot spot anything wrong with the logic.



--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <groups@xxx> wrote:
>
> Hello,
> 
> 1. I tried it and it works for me without problem.
> 
> 2. If you are getting crash you must send crash report to support 
> 
> (to get crash report from indicator code you need to UNCHECK
> "Catch system exceptions in Indicators and commentaries" box in 
> Tools->Preferences, "AFL" tab.)
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com
>   ----- Original Message ----- 
>   From: ozzyapeman 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   Sent: Friday, April 17, 2009 8:36 AM
>   Subject: [amibroker] Access Error when trying to VarGet from within a VarSet loop
> 
> 
> 
> 
>   Hoping someone can help with this. I am getting an Access Violation AmiBroker crash, and it seems to be due to using VarGet from within a VarSet loop, or at least I think that is where the problem lies.
> 
>   For example, I have several loops of this type:
> 
> 
>   for ( R = 0; R <= Counter; R++ ) 
>   { 
>       VarSet( "High"     + R, Ref( High, -R ) );                                         
>       VarSet( "Low"      + R, Ref( Low,  -R ) ); 
> 
>       VarSet( "HiLoCond" + R, VarGet( "High" + R ) - VarGet("Low" + R) >= TestLevel ) ;     
>   } 
> 
> 
> 
>   You will notice I am setting some dynamic vars, and within the same loop I am getting vars which have been set earlier in the loop. Is this allowed? Or can I only do a VarGet from inside a completely separate loop? I would think that in the order of execution, I can do what I am doing, since the vars are set a couple of lines above, but maybe not?
>




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

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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/