Bug Reporting

All posts which do not fit into any other sections of the forum.

Moderator: admin

Re: Bug Reporting

Postby robocod » Fri Jan 29, 2016 5:55 am

I just found a bug (or undocumented feature). It seems that host:trace() function now does not accept strings containing the "%" symbol.

For example, the following test code fails at "test2".

Code: Select all
    host:trace("test1");
    host:trace("test2: %");
    local x = 100;
    host:trace("test3: "..x.."%");


Not sure of the reason for this. It is a change from he previous interface. The documentation does not describe any changes to this function. Please explain, or correct in the next version.
User avatar
robocod
FXCodeBase: Graduate
 
Posts: 298
Joined: Thu May 10, 2012 4:25 pm

Re: Bug Reporting

Postby Julia CJ » Fri Jan 29, 2016 6:05 am

Hi JakMike,

You can install a new version of Indicore SDK 3.1.0.
This article contains the list of changes in Indicore 3.1.0 and download link: http://fxcodebase.com/wiki/index.php/Wh ... _SDK_3.1.0
Julia CJ
 

Re: Bug Reporting

Postby Julia CJ » Fri Jan 29, 2016 8:14 am

Hi Robocod,

Trace can format strings the same way string.format does. If you need the percent sign, use double sign (i.e. %%). The same you can see in “string.format”:

core.host:trace("test1");
core.host:trace("test2: %%");
local x = 100;
core.host:trace("test3: "..x.."%%");
Julia CJ
 

Re: Bug Reporting

Postby robocod » Fri Jan 29, 2016 11:51 am

Julia CJ wrote:Hi Robocod,

Trace can format strings the same way string.format does. If you need the percent sign, use double sign (i.e. %%). The same you can see in “string.format”:

core.host:trace("test1");
core.host:trace("test2: %%");
local x = 100;
core.host:trace("test3: "..x.."%%");


Ok, I didn't see that in the original SDK. I've got the latest update, and I see it is there.
User avatar
robocod
FXCodeBase: Graduate
 
Posts: 298
Joined: Thu May 10, 2012 4:25 pm

Re: Bug Reporting

Postby ainelle » Sun Jan 31, 2016 12:43 pm

Hi,

When the interpretor is detecting an error on an indicator, it often miss to specify the line number and it's hard to correct an error like "Error near ')'".

In case of using instance:updateFrom(), in the last version, the error detector informed the line of the call of this function, then the line of the real error inside the call. Now, only the line of the call of the function is specified. It becomes a nightmare to debug our code.
ainelle
 
Posts: 24
Joined: Wed Feb 05, 2014 1:59 pm

Re: Bug Reporting

Postby robocod » Mon Feb 01, 2016 4:08 am

When making an entry order in MarketScope with stop/limit, the stop/limit price (i.e. cost based on lot size and pips) is shown. The value shown for the stop is wrong. Please check.

Here's a screenshot of what I mean. Here the stop price is lower than it should be, but I think I've seen it higher too.

screenshot.png
User avatar
robocod
FXCodeBase: Graduate
 
Posts: 298
Joined: Thu May 10, 2012 4:25 pm

Re: Bug Reporting

Postby Julia CJ » Mon Feb 01, 2016 7:34 am

Hi Ainelle,

Could you please send the code which causes this issue? You can post it here or send at my e-mail: ycherepanova@gehtsoft.com
Julia CJ
 

Re: Bug Reporting

Postby Julia CJ » Mon Feb 01, 2016 8:03 am

Hi Robocod,

Thank you for your report about the bug. We should investigate it. I will let you know about the results as soon as possible.
Julia CJ
 

Re: Bug Reporting

Postby robocod » Tue Feb 02, 2016 5:48 pm

I've found a bug with the mathex.correl() function.

This function used to work correctly, but since the update of Trading Station I have noticed that it is not working properly in some cases.

It's hard to pinpoint the problem, but here is a dump of some variables. The i & j values are indices into some forex data sources. So, it should be finding the correlation of each of these combinations of 4 streams.

Trace: 'i = 3, j = 4, correl = 0'
Trace: 'i = 2, j = 4, correl = 0.831378'
Trace: 'i = 2, j = 3, correl = -0.42464'
Trace: 'i = 1, j = 4, correl = 0'
Trace: 'i = 1, j = 3, correl = 0'
Trace: 'i = 1, j = 2, correl = -0.821594'

The "0" values are wrong. I checked this in Excel, for some of the streams

Correl(3,4) should be -0.245392393 (this was not correctly computed by mathex.correl() )
Correl(2,4) should be 0.831378106 (this was correctly computed by mathex.correl() )
Correl(1,4) should be -0.733895749 (this was not correctly computed by mathex.correl() )
Correl(1,3) should be 0.282875814 (this was not correctly computed by mathex.correl() )
Correl(1,2) should be -0.821593597 (this was correctly computed by mathex.correl() )

So, you see some are computed correctly, but others are 0 ! So, something went wrong with the computation.

I have written my own function to replace mathex.correl(), but clearly this needs investigating / fixing.

Furthermore, it raises the question about what else has been broken in the mathex library?
User avatar
robocod
FXCodeBase: Graduate
 
Posts: 298
Joined: Thu May 10, 2012 4:25 pm

Re: Bug Reporting

Postby robocod » Wed Feb 03, 2016 5:50 am

robocod wrote:I've found a bug with the mathex.correl() function.

<< quoted post removed to save space - it's above here >>



Further to me previous bug-report on the mathex.correl() function. I have looked into this. According to internet sources, the correlation function needs to be programmed very carefully since it is summing products and squares, and these can lead to loss of significant digits if not done properly.

So, I suspect that something you have changed in the library you use is not using sufficiently precise / large variables to hold these internal sums and there is over-flow / under-flow, or general loss of significant digits.

This can be corrected by using an appropriate algorithm.
User avatar
robocod
FXCodeBase: Graduate
 
Posts: 298
Joined: Thu May 10, 2012 4:25 pm

PreviousNext

Return to General Discussions

Who is online

Users browsing this forum: No registered users and 11 guests

cron