Page 1 of 1

SDK 2.3.1 Vs SDK 3.0

PostPosted: Thu Mar 31, 2016 7:17 am
by LeTigre30
Hello to dev team,

I programmed an indicator which records some values inside this indicator

With SDK 2.3.1 : all is OK the datas are well recorded,
BUT with SDK 3.0, I obtain this error (in the "Output" tab :

Error DEbugger Flush.png


The code :
function Init()
...
indicator.parameters:addGroup("Record Signals");
indicator.parameters:addBoolean("SetRecording", "Activate Signals Recording", "", true);
indicator.parameters:addString("File", "File Name", "", "\\Data Recording\\Rec_ZZ_SemaforFast_v1.csv");

...
end

-- Variables for recording signals
local FileRec;
local Record;
local Title;
local ShowAlert;
local Compteur = 0;
function Prepare()
...
Record = instance.parameters.SetRecording;
if Record then -- TODO : Add a tick counter like cpteur = cpteur+1 for column "Chrono"
FileRec = io.open(instance.parameters.File, "a+");
if FileRec ~= nil then
Title = "Recording Stated" .. '\n';
Title = Title .. "Chrono" .. ";" .. "Date Hour" .. ";" .. "period" .. ";" .. "Search_Mode" .. ";" .. "Last_Peak" .. ";" .. "Open" .. ";" .. "High" .. ";" .. "Low" .. ";" .. "Close" .. '\n';
FileRec:write(Title);
FileRec:flush(FileRec);
else
if ShowAlert then
assert(FileRec, "FileRec == Nil")
end
end
end
end

Question : the error appears at the calling of method FileRec:flush(FileRec) ?
Why the variable "Title" is correctly recorded in the .csv file and not the following ?

The command in Bold is the line 87 of the indicator (see attached .png)

Thanks for help

Re: SDK 2.3.1 Vs SDK 3.0

PostPosted: Fri Apr 01, 2016 7:11 am
by Julia CJ
Hi LeTigre30,

I would recommend to use the 3.1.0 Indicore SDK version, so you will not have the problems.

Re: SDK 2.3.1 Vs SDK 3.0

PostPosted: Fri Apr 01, 2016 9:10 am
by LeTigre30
Hi Julia,

It's nice now ....

Thanks a lot and Bst Rgds

LeTigre30

Re: SDK 2.3.1 Vs SDK 3.0

PostPosted: Fri Apr 01, 2016 9:15 am
by LeTigre30
Hi Julia,

Following my last reply :

The issue is always on with TS2 version 01.14.112415.

Does it expected a new version of TS2 which run with indicore 3.1.0 ? if yes, When ?

Tks

Re: SDK 2.3.1 Vs SDK 3.0

PostPosted: Fri Apr 08, 2016 6:50 am
by Julia CJ
Hi LeTigre30,

FXCM has information about it. In this case I would recommend you to contact FXCM support.

Thank you.