Bug Reporting

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

Moderator: admin

Re: Bug Reporting

Postby Konstantin.Toporov » Wed Aug 16, 2017 2:34 pm

I answered to Marcello post.
About candles synchronization - we will investigate the issue.
Konstantin.Toporov
FXCodeBase: Initiate
 
Posts: 113
Joined: Mon Aug 31, 2015 10:16 am

Re: Bug Reporting

Postby PetroIV » Thu Aug 17, 2017 8:26 am

ainelle wrote:It seems there is a timing synchronization problem between history and live candles.
I explain :
If I ask for the date of the last closed daily candle, the answer is : yesterday at 23h (I live in France) and this is normal.
Ainelle

I would like to clarify how you "ask for the date of the last closed daily candle"? Do You use Marketscope and clicks on last candle? Or Do you use indicator and using for example source:date(period) or source:date(NOW) commands?
PetroIV
 
Posts: 24
Joined: Tue Aug 15, 2017 9:45 am

Re: Bug Reporting

Postby ainelle » Sun Aug 20, 2017 8:21 pm

Hi,
It is through an indicator with source:date() where source is an history request (using the function "getHistory").
But the same problem occurs when you open FXCM data through Tradingview plateform. This time clicking on the candle to see the date.
ainelle
 
Posts: 24
Joined: Wed Feb 05, 2014 1:59 pm

Re: Bug Reporting

Postby PetroIV » Mon Aug 21, 2017 6:41 am

ainelle wrote:Hi,
It is through an indicator with source:date() where source is an history request (using the function "getHistory").
But the same problem occurs when you open FXCM data through Tradingview plateform. This time clicking on the candle to see the date.


Hi, I wrote a test indicator see attachment. It executes the command getHistory at a specified interval and timeframe and stores the result in a specified text file. I launched it and at first glance everything is OK.

08/21/2017 05:00:00
08/21/2017 01:00:00
08/20/2017 21:00:00
08/20/2017 17:00:00
08/18/2017 13:00:00
08/18/2017 09:00:00
08/18/2017 05:00:00
08/18/2017 01:00:00
....
Attachments
getHistoryTest.lua
TestIndicator
(2.62 KiB) Downloaded 860 times
PetroIV
 
Posts: 24
Joined: Tue Aug 15, 2017 9:45 am

Re: Bug Reporting

Postby ainelle » Tue Aug 22, 2017 11:53 am

Sorry, but it's not good at all, because in Live, when you check the candle time, the closed/open time are :
- 23:00
- 3:00
- 7:00
- 11:00
- 15:00
- 19:00

And about the daily closure, in live, the new candle appears at 23:00, whereas for the history, the new candle appears at 17:00.

Note : all the timings are in CET
ainelle
 
Posts: 24
Joined: Wed Feb 05, 2014 1:59 pm

Re: Bug Reporting

Postby Alexey.Pechurin » Wed Aug 23, 2017 4:37 am

Hello ainelle,

Sorry but we cannot understand and repeat your problem.

A new daily bar is created always at 17:00 EST with a first incoming tick, your local time is 23:00. TS shows something like "Server time 17:00 (UTC-05:00)" in its status bar in the right bottom corner of its main window at this time.

Code: Select all
function Init()
    indicator:name("Test getHistory");
    indicator:description('tests core.host:execute("getHistory") function');
    indicator:requiredSource(core.Bar);
    indicator:type(core.Indicator);
    indicator:setTag("group", "Tests");
end

local history;
local source;

function Prepare()
    local name = profile:id();
    instance:name("Test getHistory");
    source = instance.source;

    if nameOnly then
        return;
    end

    history = core.host:execute("getHistory", 1000, source:instrument(), source:barSize(), 0, 0, true);
end

function Update(period, mode)
    if history:size() > 0 then
        core.host:trace("Last bar date: " .. core.formatDate(history:date(-1)));
    end
end

function AsyncOperationFinished(cookie, success, message)
end


This indicator - when added on a daily chart - loads a daily history stream and shows date of its last bar on each tick in Events Log view. Note it shows time in EST timezone. So you can see something like "Last bar date: 08/22/2017 17:00:00". This string is updated to the next day once per day at 17:00 EST or 23:00 your local time. Does it work in another way?

Or probably we do not understand you?

Alexey
Alexey.Pechurin
 
Posts: 98
Joined: Sun Jul 22, 2012 11:26 pm

Re: Bug Reporting

Postby ainelle » Wed Aug 23, 2017 3:16 pm

I will try to explain with a capture in attachment:
Capture.JPG

This capture has been taken at 20:01 CET. The timing are all translated to CET.

As the indicator is running since monday, you can see 'updated by the live' information and 'history' information.
The capture is showing the source:date() of the last closed candle.

For m15, the date is @19:45 and it's ok, because it is 20:01, therefore, the la closure happend at 19:45, but as the function date() is answering the open date, everything is OK.
m30 : OK
H1 : OK
H2 : OK as the opening happen on odd hours
H4 : problem, because in a live graph in H4, the candle has closed at 19:00 and it's open date is 15:00, as you can see in the 2nd attachement:
H4_capture.JPG


H8 : same problem : the open date is 9:00, whereas in a live graphic, the supposed open date is 7:00

D1, W1, M1 : you clearly can see the problem : the open date should be at the same hour, as the daily, weekly and monthly opening are, actually, daily opening.
So you can see that, because my indicator is running since last monday, the daily information has been updated in live at 17:00, instead of 23:00. However, because my indicator is running since less that one week, the weekly and monthly informations have been directly taken from the FXCM server history without 'live' update and with a correct data : 23:00.
Note that the daily closure information has been exactly received at 17:00 CET, whereas the daily candle is supposed to close/open at 23:00 CET.

I hope those captures help your understanding of the problem

Best Regards
ainelle
 
Posts: 24
Joined: Wed Feb 05, 2014 1:59 pm

Re: Bug Reporting

Postby Alexey.Pechurin » Fri Aug 25, 2017 3:48 am

Unfortunately we still cannot repeat your problem. Attached you can find the indicator that does - I guess - the same as your one. It has worked for entire day and there are no problems with it. Could you provide additional information:
1) You wrote that TS worked few days. Did you notice this problem in the first day or after few days of continuous work?
2) How you convert dates from EST to your timezone?
3) What is your version of TS as shown in About dialog?
4) What is your database? It's shown in a status bar. Can you send a log file by email?
5) Could you provide your indicator's source code or its restricted version - with code that loads data and shows dates but w/o some private logic that is important for you?
6) If we still failed to repeat the problem we could prepare and send you dev. version that will write additional data to the log file. Could you try it?
Attachments
getHistoryTest_multi.lua
(3.28 KiB) Downloaded 870 times
Alexey.Pechurin
 
Posts: 98
Joined: Sun Jul 22, 2012 11:26 pm

Re: Bug Reporting

Postby ainelle » Thu Aug 31, 2017 3:45 am

Sorry, I forgot to say that I moved my indicator to ForexConnect, in order to avoid frozen problem on TS2 plateform (probably due to processing).
That's why I specified that we can see the same problem when we connect FXCM account on TradingView plateform : Candle close timing are 6 hour shifted
ainelle
 
Posts: 24
Joined: Wed Feb 05, 2014 1:59 pm

Re: Bug Reporting

Postby Alexey.Pechurin » Fri Sep 01, 2017 3:26 am

Ok... So you integrated your indicator with ForexConnect, didn't you? In this case we need to know more details how you did it. How do you receive and keep a price collection? You can get only historical prices using ForexConnect. It's responsibility of your application to process incoming ticks and to keep a live prices collection by updating the last bar or by adding a new one. How do you do it? We can communicate by skype (chat only) or email if you wish. Could you send us some example code?
Alexey.Pechurin
 
Posts: 98
Joined: Sun Jul 22, 2012 11:26 pm

PreviousNext

Return to General Discussions

Who is online

Users browsing this forum: No registered users and 5 guests

cron