SDK 2.3.1 Vs SDK 3.0

Moderator: admin

SDK 2.3.1 Vs SDK 3.0

Postby LeTigre30 » Thu Mar 31, 2016 7:17 am

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
User avatar
LeTigre30
FXCodeBase: Initiate
 
Posts: 173
Joined: Sun Dec 19, 2010 5:10 am
Location: Nimes (France)

Re: SDK 2.3.1 Vs SDK 3.0

Postby Julia CJ » Fri Apr 01, 2016 7:11 am

Hi LeTigre30,

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

Re: SDK 2.3.1 Vs SDK 3.0

Postby LeTigre30 » Fri Apr 01, 2016 9:10 am

Hi Julia,

It's nice now ....

Thanks a lot and Bst Rgds

LeTigre30
User avatar
LeTigre30
FXCodeBase: Initiate
 
Posts: 173
Joined: Sun Dec 19, 2010 5:10 am
Location: Nimes (France)

Re: SDK 2.3.1 Vs SDK 3.0

Postby LeTigre30 » Fri Apr 01, 2016 9:15 am

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
User avatar
LeTigre30
FXCodeBase: Initiate
 
Posts: 173
Joined: Sun Dec 19, 2010 5:10 am
Location: Nimes (France)

Re: SDK 2.3.1 Vs SDK 3.0

Postby Julia CJ » Fri Apr 08, 2016 6:50 am

Hi LeTigre30,

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

Thank you.
Julia CJ
 


Return to Indicator Development

Who is online

Users browsing this forum: No registered users and 6 guests