Hello,

AmiBroker crashes when i use name() and atcFlagEnableInBacktest in the
AddToComposite function. Can someone confirm this ?
Is there any reason for this behaviour and solution to prevent it ?
Here is my code to reproduce. Please run it over all symbols, because
it seems to depend on the symbol or any other factor.

// long trades entry and exit rules:
Buy = Cross( CCI(), 100 );
Sell = Cross( 100, CCI() );

// short trades entry and exit rules:
Short = Cross( -100, CCI() );
Cover = Cross( CCI(), -100 );

CompName = Name();
//CompName = "WithoutNameFunction"; //no crashes
// Also no crashes if i use name() but not atcFlagEnableInBacktest

AddToComposite(1, "TEST_" + CompName, "Open",
atcFlagDefaults|atcFlagEnableInBacktest|atcFlagDeleteValues);


-- 
Kind regards
Thomas
www.PatternExplorer.com

Reply via email to