IO.STDERR

Moderator: admin

IO.STDERR

Postby LeTigre30 » Mon Jul 20, 2015 12:35 pm

Hello to all dev Team,

In one of my indi's, I set a possibility to record data ... it works perfectly with W7,
But when I want run this indi with W8.1, Marketscope returns always an error in opening file.
The folder where I record the Data, is With Administrator's Authorizations :

C:\Program Files (x86)\Candleworks\FXTS2\Data_Recording\

the declaration in the Indi's parameters code is :

indicator.parameters:addString("File", "FileName", "", "\\Data_Recording\\Rec_NLZZ_Trend_v1.csv");

......
......
local FileRec;
the calling is in Prepare() :

FileRec = io.open(instance.parameters.File, "a+"); // returns always 'NIL'

I think the issue comes from the path of the file, is someone has a solution ?
User avatar
LeTigre30
FXCodeBase: Initiate
 
Posts: 173
Joined: Sun Dec 19, 2010 5:10 am
Location: Nimes (France)

Re: IO.STDERR

Postby Apprentice » Tue Jul 21, 2015 4:41 am

Can you post your indicator, for testing purposes.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: IO.STDERR

Postby LeTigre30 » Tue Jul 21, 2015 1:37 pm

Hi Apprentice,

I solved the issue in adding 'core.app_path()' before the parameter :

All is OK

FileRec = io.open(core.app_path() .. instance.parameters.File, "a+");

BUT Lua send always an error with this call

TF_Bar = source:barsize(); Lua says "Rec_NLZZ_Trend.lua:127: attempt to call method 'barsize' (a nil value)."

Rec_NLZZ_Trend.lua
(8.92 KiB) Downloaded 836 times
User avatar
LeTigre30
FXCodeBase: Initiate
 
Posts: 173
Joined: Sun Dec 19, 2010 5:10 am
Location: Nimes (France)

Re: IO.STDERR

Postby LeTigre30 » Tue Jul 21, 2015 1:44 pm

Sorry Apprentice,

I saw my error : the letter 'S' of 'Size' must be upper case

See you later

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

Re: IO.STDERR

Postby LeTigre30 » Thu May 12, 2016 3:52 am

Hello to dev team,

I match another issue when I xant record the signal values :

the code :

Code: Select all
local Record;
local Filerec;
local Time;
local Titre;
local counter;
-- signals recording : Titles and headers
   Record = instance.parameters.SetRecording;
   if Record then      -- add a counter for the received ticks like counter= counter+1
      FileRec = io.open(instance.parameters.File, "a+");
      if FileRec ~= nil then
         Time=core.dateToTable(core.now());
         Titre = "Enregistrement Démaré le " .. Time.day .. "/" .. Time.month .. "/" .. Time.year .. " " .. Time.hour .. ":" .. Time.min .. ":" .. Time.sec .. '\n';

         Titre = Titre .. "Chrono" .. ";" .. "Date Heure" .. ";" .. "period" .. ";" .. "PrixMax" .. ";" .. "PrixMin" .. ";" .. "Open" .. ";" .. "High" .. ";" .. "Low" .. ";" .. "Close" .. '\n';
         FileRec:write(Titre);
         FileRec:flush(FileRec);
      else
         if ShowAlert then
            assert(FileRec, "FileRec == Nil")
         end
      end
   end
end


The code above works well with SDK 3.1.0, but with TS2 version 01.14.112415
when the indicator runs on a chart the issue below appears at line 83 : FileRec:flush(FileRec);
and the indicator is ot accepted by th TS2.

Can you help ?

Best Regards

Flush_Issue.png
Flush_Issue.png (9.92 KiB) Viewed 2482 times
User avatar
LeTigre30
FXCodeBase: Initiate
 
Posts: 173
Joined: Sun Dec 19, 2010 5:10 am
Location: Nimes (France)

Re: IO.STDERR

Postby Julia CJ » Thu May 12, 2016 7:57 am

Hi LeTigre30,

Thank you for the report. This seems like a known bug and we have fixed it. Currently it shouldn't be in the new version of Trading Station. Please use the updated production version of TS.
Julia CJ
 

Re: IO.STDERR

Postby LeTigre30 » Thu May 12, 2016 12:25 pm

hi Julia,
Thanks for replying,
Where I can download the version which works correctly for :flush ()
concerning by the updated production new version of TS2 ?
User avatar
LeTigre30
FXCodeBase: Initiate
 
Posts: 173
Joined: Sun Dec 19, 2010 5:10 am
Location: Nimes (France)

Re: IO.STDERR

Postby LeTigre30 » Fri May 13, 2016 2:54 am

Hi Julia,

Because I must urgently save the data of an indicator that I just created, is there another way to bypass the error of TS2, which does not accept the method: flush ()
User avatar
LeTigre30
FXCodeBase: Initiate
 
Posts: 173
Joined: Sun Dec 19, 2010 5:10 am
Location: Nimes (France)

Re: IO.STDERR

Postby Julia CJ » Fri May 13, 2016 5:23 am

Hi LeTigre30,

You can download the beta version using the following link:
http://fxcodebase.com/bin/products/FXTS ... l_beta.exe

In current production version of TS should not be such error. It was fixed. If you have any questions, please let me know.

Thank you.
Julia CJ
 


Return to Indicator Development

Who is online

Users browsing this forum: No registered users and 11 guests