I answered to Marcello post.
About candles synchronization - we will investigate the issue.
Moderator: admin
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
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.
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
Users browsing this forum: No registered users and 14 guests