Thank you Tomasz, for going out on a limb and trying to take us to the leading edge of afl.
I am sure everyone shares my appreciation for all your efforts.
Best regards,
Herman
Thank you Tomasz, for going out on a limb and trying to take us to the leading edge of afl.
I am sure everyone shares my appreciation for all your efforts.
Best regards,
Herman
That is because @aron has read what I wrote carefully and he calls StaticVarRemove
BEFORE declaring the variable, so he removes variable from global memory before it gets read from global memory when variable is declared as static. That is why it works. In all your attempts you called StaticVarRemove after declarations. That is why it doesn’t have any effect.
To allow faster evolution and freedom of experimenting without “legacy” baggage some APIs (AFL functions but in the future not only that) will be marked as “Private APIs”.
Private APIs
All functionality provided by #pragma
directive is now marked as Private API.
Good idea. Don’t let support burden slow down progress of Amibroker.
The Amibroker community can assist for issues that are out of the scope of support. Perhaps pointing to the right documentation would be enough.
One feature is not mentioned in the Read Me.
AmiBroker 6.26 comes with Edit->Delete Range feature now.
So here it comes, how to use delete range feature:
The operation is pretty much instant regardless of how many quotes you have.
Using WIN 7 and AB ver 6.26
Runing Backtest I get a strange error
The code shown in this message is not part of the code of this program. It s on my computer someplace as I wrote it as another program.
The problem disappears when I downgrade to AB version 6.25
Ara
You should REALLY read this thread - it is already answered few posts above. And generally ALWAYS search the forum BEFORE posting.
After updating to 6.26 a couple of error 66's show up. When I roll back to 6.25 the errors disappear.
What could be the issue here?
One bar loop triggers the error message, while another apparently gets a pass.
JW
Scroll UP in this thread - it is described in the read me and in this thread.
The Readme says:
Simply use debugging methods and trace your VarGet/VarSet name.
Then you would see that it has invalid characters within varname.
Your varname is
"PosSize" + symbol + bar
So for example trace it
varname = "PosSize" + symbol + bar;
_TRACE( varname );
You will see that varname simply has invalid characters.
My guess is that you have symbol names of this type:
XXXX.TO
If you would not use Varget/VarSet but would use standard way of setting variables then you would not be allowed to create variables such as following ones too. Would you?
var.16-AAPL = "Hello World";
or
10var = "Hello World";
or
+1var = "Hello World";
etc.
No, as you know already varnames have to start with underscore or letter but are not allowed to start with number or other characters. Also one and only character different from A-Z, 0-9 being allowed within variable name is underscore “_”. No point sign, no plus sign, no minus sign, no slash … etc within variable name are allowed. Have you ever used plus sign within variable name? Surely not.
So proper examples for variable names are
var1 = "Hello World";
var_20= "Hello World";
_var10_AAPL = "Hello World";
etc.
So since your var names differ from those naming rules it is the reason for your error message.
No point sign, no plus sign, no minus sign, no slash … etc within variable name are allowed.
@fxshrat: Thanks for your comprehensive clarification. I should have paid closer attention when digesting the Readme.
The culprit is indeed the symbol naming: $ETF, with the now forbidden $-sign.
With the new “protection” for VarSet/VarGet in place, how are we to handle synthetic symbols like $SPY, #SPY, or @SPY? I have lots of those in my data base. Actually the Norgate data set has those too: #SPX%MA200, $SPX, %IRX to mention a few.
Replace “symbol” by “i” within varname.
So instead of
varname = "PosSize" + symbol + bar;
use
varname = "PosSize_" + i + "_" + bar;
@Tomasz: Any chance making the new VarSet/VarGet variable name convention part of the system preferences?
Default setting “On” and allowing the user to opt-out, which would preserve downward compatibility of existing AFLs at the same time.
Variable identifiers must only use A-Z letters, digits and underscore. The fact that people were using invalid names caused problems including in extreme cases - crashes.
AmiBroker in version 6.26 will fix human errors itself, by replacing invalid characters with underscore automatically
@Tomasz I am just curious from the non-programming background as to the reason
variable identifiers must only use A-Z letters, digits and underscore
I have seen this is the case in C++ and I assume there is a technological (legacy of programming languages? other symbols reserved for other purposes?) reason, and am just trying to learn what that might be.
The reasons were outlined already in @fxshrat post.
If you allowed *, +, -, @, /, ", spaces and all other characters in variable names, how would you know if
a+b +"c"
means:
a
and b
and text "c"
? (what it “normally” means), or maybe rathera+b+"
?, or maybea+
, or zillion of other choicesThere is a reason why in elementary school you used convention to write x
instead of 23 &%#b lah 45
to describe the variable
I use eSignal data and the symbology includes “-” “~” and “$” in many symbol Names
for example" AP Z7-SFE", Z Z7-EEI …
I use many Static Variables that dynamically append the symbol name.
eg
StaticVarSet( "L_SlowMAPeriod" + Name() + Ver, LongSlowMAPeriod, persistent = True );
Given “Name()” has “-” as part of the symbol it generates error 66.
As you have automatically replaced all “-” with “_” the code still runs correctly.
Since version 6.26 every time I run a backtest I get several of these error 66 messages to close.
Took me a whie to work out what was generating this error as the error message does not reference the offending line of code.
I would like a means of eliminating the error message when I run a backtest please.
Many thanks to all in this forum who proved great support and share ideas and code.
Thanks to Tomasz and team for a truly great trading software and the ongoing development.
Richard Scanlan