Print(File) Problem

Questions about MultiCharts and user contributed studies.
titletrading
Posts: 23
Joined: 24 May 2010
Location: USA

Print(File) Problem

Postby titletrading » 10 Jun 2010

I am trying to load historical results for a daily indicator over the past two years. I got the code Print((File(C;/xxxx),Ind,"IND") to compile and run but it has stopepd working. I have tried this test code to just print the date and have gotten difficulty creating the file. The filepath is correct.

Code: Select all

If Time=sessionendtime(0,1) then begin
Print(File("P:\Ari_Project\The ACD Project\Test File"),"Date",",",date);
plot1(Date,"Date");
end;
What have other people done to write to file for use in Excel? I cannot use a .dll it slows down my strategy considerably.

User avatar
Anastassia
Posts: 179
Joined: 18 Jan 2010
Been thanked: 4 times

Postby Anastassia » 28 Jun 2010

Hello Titletrading,

You need to modify the code as follows in order to find out whether or not Time=sessionendtime(0,1) condition is met.
If in PowerLanguage output you will see lines such as Yes :..., then the condition is met. So file is supposed to be created. If you won't see this line then the condition is not met and, therefore, file won't be created.
If so, we will need to see why the condition is not met. One possible cause is incorrect sessions.

Code: Select all

If Time=sessionendtime(0,1) then begin
Print(File("P:\Ari_Project\The ACD Project\Test File"),"Date",",",date);

Print("YES : Date: ", date, " Time: ", time);
end;


Return to “MultiCharts”