Bug Reporting

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

Moderator: admin

Re: Bug Reporting

Postby robocod » Wed Oct 05, 2016 3:42 pm

(Please can we try to keep this thread for "platform bugs", the previous few posts seem to be indicator coding issues.)

Earlier I reported that the "vertical zoom fix" has not solved the problem when the indicator is set to "Show in background". Will you please look into this.
User avatar
robocod
FXCodeBase: Graduate
 
Posts: 298
Joined: Thu May 10, 2012 4:25 pm

Re: Bug Reporting

Postby Georgiy » Thu Oct 06, 2016 4:48 am

Hi robocod,

Earlier I reported that the "vertical zoom fix" has not solved the problem when the indicator is set to "Show in background". Will you please look into this.

Thank you. We are investigating this at the moment.
Georgiy
FXCodeBase: Initiate
 
Posts: 150
Joined: Tue Jul 29, 2014 4:49 am

Re: Bug Reporting

Postby jerb13 » Fri Oct 07, 2016 12:54 pm

I am consistently encountering bugs when developing code using host:execute("getSyncHistory", ...).

The problem is that the code works fine in the editor/debugger but in marketsope it exhibits buggy behavior or throws errors. Can someone from the dev team please be responsive to this issue. Can you at least verify that you are getting the same behavior?

How is it even possible for code to execute fine in the debugger and throw errors in the platform? This makes it impossible to develop code and extremely frustrating.

I reported on this earlier on this thread and there has been no response from the dev team.
http://fxcodebase.com/code/viewtopic.php?f=25&t=40395&start=200#p108324

Here is another example. Please confirm that you can run this in the debugger without throwing an error and then run it in marketscope and get an error.

Code: Select all

function Init()
  indicator:name("demo")
  indicator:description("")
  indicator:requiredSource(core.Bar)
  indicator:type(core.Indicator)
end
 
local LTF, HTF
local first
local i               
local barSize
local host
local mod
local dayoffset, weekoffset
local loading
local date, minutes

function Prepare()
  LTF = instance.source
  local name
  name = profile:id() .. "(" .. instance.source:name() .. ")"
  instance:name(name)
  host = core.host

  dayoffset = core.host:execute("getTradingDayOffset")
  weekoffset = core.host:execute("getTradingWeekOffset")
 
  barSize = "m5"
  i = 2

  first = LTF:first()
  o = instance:addStream("o", core.Line, name, "output", core.rgb(0, 0, 255), first)


  HTF = host:execute("getSyncHistory", LTF:instrument(), barSize, LTF:isBid(), i + 1, 100, 101)
 
  mod = (barToMinutes(barSize) * i) / barToMinutes(LTF:barSize())
end

function Update(period, mode)

  if loading or HTF:size() == 0 then
      return false
  end

  if period < LTF:first() then
      return false
  end

  p = getP(period)

  if not p then
    return;
  end

end

-- the function is called when the async operation is finished
function AsyncOperationFinished(cookie)
    if cookie == 100 then
        loading = false;
        --instance:updateFrom(0);
    elseif cookie == 101 then
        loading = true;
    end
end

function getP(period)
  local barBegin

  date = core.dateToTable(LTF:date(period))
  minutes = date.min + (date.hour * 60)

  if minutes % mod == 0 then

    -- get datetime of beggining of current LTF period
    barBegin = core.getcandle(barSize, LTF:date(period), dayoffset, weekoffset)

    -- get index of the HTF current period
    P = core.findDate(HTF, barBegin, false)

  end
 
  -- candle is not found
  if P < 0 then
    return false
  else 
    return P
  end
end

-- converts the bar size string into minutes for bar sizes D1 or less
function barToMinutes(barsize)
  local t, q, v
  t = string.sub(barsize, 1, 1)
  q = tonumber(string.sub(barsize, 2))
  if      t == "m" then v = q
  elseif  t == "H" and q == 1 then v = 60
  elseif  t == "H" and q == 2 then v = 120
  elseif  t == "H" and q == 3 then v = 180
  elseif  t == "H" and q == 4 then v = 240
  elseif  t == "H" and q == 6 then v = 360
  elseif  t == "H" and q == 8 then v = 480
  elseif  t == "D" then v = 1440
  else assert(false, "barToMinutes: Bar size is out of bounds. Use D1 or less.") end
  return v
end


This is the error I get when executed in market scope. I have done extensive tracing of this variable in the debugger and know that it is not a nil value when run in the debugger.

Screen Shot 2016-10-07 at 9.51.58 AM.png


Thank you.

Regards.
jerb13
 
Posts: 6
Joined: Mon Sep 12, 2016 7:35 pm

Re: Bug Reporting

Postby Georgiy » Mon Oct 10, 2016 5:28 am

Hello jerb13,

The problem is that the code works fine in the editor/debugger but in marketsope it exhibits buggy behavior or throws errors.


It works fine in debugger because you receive a specific set of data and the code works only for that set of data.
It seems that your code works only with specific charts (with little amount of data).

We tried to uncomment string
Code: Select all
trace("update --> val: " .. tostring(val))

then added some data and everything worked fine.

The code is incorrect:
Code: Select all
function getP(period)
      local barBegin

      date = core.dateToTable(LTF:date(period))
      minutes = date.min + (date.hour * 60)

      if minutes % mod == 0 then ---

        -- get datetime of beggining of current LTF period
        barBegin = core.getcandle(barSize, LTF:date(period), dayoffset, weekoffset)

        -- get index of the HTF current period
        P = core.findDate(HTF, barBegin, false)

      end
     
      -- candle is not found
      if P < 0 then
        return false
      else
        return P
      end
    end

if minutes % mod == 0 then --- What if it is not??? P will be uninitialized, i.e. nil
Georgiy
FXCodeBase: Initiate
 
Posts: 150
Joined: Tue Jul 29, 2014 4:49 am

Re: Bug Reporting

Postby jerb13 » Mon Oct 10, 2016 1:49 pm

It works fine in debugger because you receive a specific set of data and the code works only for that set of data.
It seems that your code works only with specific charts (with little amount of data).


Thank you for your kind response. I had assumed the beginning of period 0 would always correspond with minute 0 for each data set. Clearly I was wrong. I will be more thorough in my testing across a variety of data sets before reporting in the future.

Thank you for your patience as I learn this platform.

Regards.
jerb13
 
Posts: 6
Joined: Mon Sep 12, 2016 7:35 pm

Re: Bug Reporting

Postby papynou34 » Fri Nov 04, 2016 3:58 am

Hello All,
It seems there is a bug with the management of the indicators.
After having click on Indicators, then ADD and Manage, there is no .lua or Bin displayed in the folder.
Please see the picture.

Bug Indi.PNG
papynou34
FXCodeBase: Initiate
 
Posts: 130
Joined: Fri Mar 27, 2015 6:52 pm

Re: Bug Reporting

Postby Georgiy » Mon Nov 07, 2016 5:44 am

Helo papynou34,

Thank you for pointing this out.
The issue will be fixed in the next FXTS release.
Georgiy
FXCodeBase: Initiate
 
Posts: 150
Joined: Tue Jul 29, 2014 4:49 am

Re: Bug Reporting

Postby chinabuaawd » Thu Dec 01, 2016 10:50 pm

Indicore SDK 3 has two major back steps:
1 The old version have no limits on the backtest history. New version seems only able to show the backtest result back from 3 years around history.
2 The strategy optimization has been deleted, we can only makes the optimization from marketscope, this can also work, but low down the working efficiency a lot!

Hope there could be some improves from next version.
chinabuaawd
 
Posts: 20
Joined: Wed May 07, 2014 10:32 am

Re: Bug Reporting

Postby Sergey.Konovalov » Thu Dec 08, 2016 6:02 am

Hello chinabuaawd,

Your issue forwarded to the development team.
Thank you for the information.
Sergey.Konovalov
 
Posts: 15
Joined: Fri Dec 02, 2016 1:44 am

Re: Bug Reporting

Postby happyneptune » Fri Dec 09, 2016 12:30 am

When backtesting strategies on indices like spx500, us30, ger30 by IndicoreSDK 2.3, I meet some bugs on us30 and ger30 except spx500.

The bugs on us30 and ger30 are: opening and closing positions are correct at a glance; but the equity and balance keep unchanged all the time.
The bugs also occurs on IndicoreSDK 3.1.

Hope these bugs could be fixed in the next version.
If I can choose, I will prefer v2.3, because the latest version 3.1 has tow disadvantages: about 2 years limit on backtest history length; no optimization.
happyneptune
 
Posts: 2
Joined: Mon Oct 17, 2016 9:44 pm

PreviousNext

Return to General Discussions

Who is online

Users browsing this forum: No registered users and 4 guests