Topics
Replies
tippy
13 Jan 2022, 12:07
RE: RE: RE:
ok, I have checked it. That recurrency works fine for the first time and response comes immediately. Run it again from the menu and response does come randomly.
Regarding missing trendbars please try this one:
Execution: ProtoOAGetTrendbarsReq 1 M1 1
def sendProtoOAGetTrendbarsReq(weeks, period, symbolId, clientMsgId = None):
request = ProtoOAGetTrendbarsReq()
request.ctidTraderAccountId = currentAccountId
request.period = ProtoOATrendbarPeriod.Value(period)
request.fromTimestamp = 1578362820*1000 # 2020-01-07 02:07:00 GMT
request.toTimestamp = 1578363000*1000 # 2020-01-07 02:10:00 GMT
request.symbolId = int(symbolId)
deferred = client.send(request, clientMsgId = clientMsgId)
deferred.addErrback(onError)
The "2020-01-07 02:09:00" is missing in my response.
Message received:
period: M1
timestamp: 1578363000000
trendbar {
volume: 40
low: 111925
deltaOpen: 4
deltaClose: 0
deltaHigh: 5
utcTimestampInMinutes: 26306047 //<- 2020-01-07 02:07:00
}
trendbar {
volume: 14
low: 111924
deltaOpen: 2
deltaClose: 0
deltaHigh: 2
utcTimestampInMinutes: 26306048 //<- 2020-01-07 02:08:00
}
trendbar {
volume: 20
low: 111924
deltaOpen: 1
deltaClose: 1
deltaHigh: 1
utcTimestampInMinutes: 26306050 //<- 2020-01-07 02:10:00
}
symbolId: 1
@tippy
tippy
13 Jan 2022, 01:40
RE:
thanks for response. I have noticed that first run is ok, problem occurs after another execution. Could you try execute sendProtoOAGetTrendbarsReq multiple times and check if it is ok?
I have another issue, is it normal that some of trendbars are missing in historical data for EURUSD on M1? I am using a demo account from the IC Markets.
@tippy
tippy
13 Jan 2022, 13:08
RE:
ok, it seems to work well on your system.
Could you please check missing trendbar with timestamps?
@tippy