Home › Forums › Trading System Mentor Course Community › AmiBroker Coding and AFL › Problem with “%” symbol in Param builtin function
- This topic is empty.
-
AuthorPosts
-
February 4, 2016 at 12:19 pm #101423AnonymousInactive
just noticed this while playing with the debugger:
mcp = Param(“Probability of Ignoring any Entry Signal %”,0,1,100,1);
this does not return mcp = 0 as i expected. it returns mcp = 1
the problem seems to be caused by the “%” symbol in the text. once that is removed it behaves as expected.has anyone else seen this problem?
February 4, 2016 at 1:08 pm #102768LeeDanelloParticipantParam(“Probability of Ignoring any Entry Signal %”,0,1,100,1);
Param( ”name”, defaultval, min, max, step, sincr = 0 )
you have a default value of 0 and a minimum of 1. That doesn’t sound logical. The minimum should be 0
February 4, 2016 at 1:25 pm #102769AnonymousInactiveI have also tried many other vales, eg:
mcp = Param(“Probability of Ignoring any Entry Signal %”,20,1,100,1);with the same result of mcp = 1
edit: actually it seems to be very buggy behaviour where mcp = previous default value from Param function
February 5, 2016 at 2:07 am #102771AnonymousInactiveDVink wrote:I have also tried many other vales, eg:
mcp = Param(“Probability of Ignoring any Entry Signal %”,20,1,100,1);with the same result of mcp = 1
edit: actually it seems to be very buggy behaviour where mcp = previous default value from Param function
problem not with “%” symbol but with Param function. it seems to hold the last used default value. perhaps there is garbage collection issue with Param. the problem is noticeable when stepping through in debug mode with a watch list.
February 5, 2016 at 3:16 am #102792Stephen JamesMemberFor those that are brand new to AmiBroker and did not have previous versions. The debugger was introduced in the latest version, 6.10, so although its an official release, its very possible there are still bugs to sort out, being a new feature.
February 5, 2016 at 3:42 am #102793AnonymousInactiveim also seeing the same problem by hitting the “apply” button in formula editor and using the interpretation window rather than the watch window in debug mode. ie:
mcp = Param(“Probability of Ignoring any Entry Signal %”,25,1,100,1);
“”;
“mcp: ” + NumToStr(mcp);unreliable behaviour with mcp using previous default values from Param. perhaps an email to [email protected] if others can recreate the same/similar issue? is it just me with this issue?
edit: im using amibroker standard edition (32 bit) version 6.10.0, build date: Jan 8 2016 on windows 10
February 5, 2016 at 4:15 am #102794Stephen JamesMemberGood idea, I’ll try and replicate the issue.
February 5, 2016 at 8:19 am #102795SaidBitarMemberHi
I tried with the same code and I did not have the problem.
February 5, 2016 at 11:47 pm #102798Stephen JamesMemberI can’t seem to replicate the issue either.
February 6, 2016 at 6:58 am #102800AnonymousInactiveOK it just seems to be me then. I’ve attached a screen capture showing the problem.
– It really does give buggy behaviour when changing the default value and text string in debug mode
– its fine when executing the script through the analysis window and resetting the parameters in the parameters pop up windowi guess its a good reminder to always check that the code is doing what it should!
February 6, 2016 at 10:02 am #102801SaidBitarMemberNo it is not only for you
i got it
the problem appears only in the debugger, in my opinion the reason is
the debugger is new feature so still there are bugs all over the place which is normalthe solution is to clear the cache how ?? still i have to check but normally this happen when the cache is not cleared. i tried to close and reopen Amibroker but did not help.
the good thing this issue is only in the debugger and not in the backtester or the interpretation
February 6, 2016 at 11:45 am #102802AnonymousInactiveOK glad I’m not the only one! I’ll shoot off an email to [email protected] and post the response when it comes.
also, i did notice the same buggy behaviour in the interpretation window when not using the debugger but hitting the “apply” button from the formula editor window. i think the best way to fully avoid the problem is to open the “paramaters” window and hit “reset all”
February 7, 2016 at 12:05 am #102803Stephen JamesMemberTo clear the cache go to File>Database Settings>Flush cache
Also, if you are editing whilst the debugger is on, that could cause issues. I think I read somewhere that you should not edit whilst the debugger is running but I’ll check that out further.
February 9, 2016 at 2:05 am #102804AnonymousInactiveHere is the reply from Amibroker support:
Quote:Hello,Thank you very much for your e-mail.
Parameters are cached, as this is actually what this functionis meant to do, so this could happen if you:
– change DEFAULT value
– keep the same parameter name (text field remains unchanged).However – if you update both arguments (and the text is a completely new word, which was not cached in earlier attempts), then you will see WATCH window reporting correctly new default value. I’ve tested this behaviour on my end and it worked as per the above description in AB 6.10.
Best regards
Marcin Gorzynski
Amibroker.com Technical SupportFebruary 10, 2016 at 8:33 am #102809SaidBitarMemberQuote:Parameters are cached, as this is actually what this functionis meant to do, so this could happen if you:
– change DEFAULT value
– keep the same parameter name (text field remains unchanged).Sounds scary that the cache is not cleared all the time
Anyhow may be good exercise is to clear the cache manually (as described by Craig) from time to time just to be sure that the results and all the tests are accurate. -
AuthorPosts
- You must be logged in to reply to this topic.