A timer to read a text file: How to do that

Questions about MultiCharts and user contributed studies.
arjfca
Posts: 1273
Joined: 23 Nov 2010
Has thanked: 721 times
Been thanked: 222 times

A timer to read a text file: How to do that

Postby arjfca » 28 Jun 2011

Hello

I'm seeking help from the MC community.

I want to create a timer that will read a text file F:ExcelStatus.TXT every 200 ms.
I know how to read a file and process it, but no idea how to code for a timer.

Any help appreciated.

Martin

User avatar
TJ
Posts: 6586
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 971 times
Been thanked: 1907 times

Re: A timer to read a text file: How to do that

Postby TJ » 28 Jun 2011

arjfca wrote:Hello

I'm seeking help from the MC community.

I want to create a timer that will read a text file F:ExcelStatus.TXT every 200 ms.
I know how to read a file and process it, but no idea how to code for a timer.

Any help appreciated.

Martin


200 ms is a very short time,
not worth the trouble of a timer.

IB's update is every 250~300 ms.

You might as well let the indicator update every tick.

arjfca
Posts: 1273
Joined: 23 Nov 2010
Has thanked: 721 times
Been thanked: 222 times

Re: A timer to read a text file: How to do that

Postby arjfca » 28 Jun 2011

Hello TJ

It's just that I didn't want to over charge the file reading. I got the feeling that it may slow down.
my pc.

The idea id to read a text file that is written from Excel. I got a tool to read directly in the Excel cell, but is is not recommended to do it frequently. I was told that Excel is not fast enough for that.

So I came out with the idea to read info from a text file.

Martin

User avatar
TJ
Posts: 6586
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 971 times
Been thanked: 1907 times

Re: A timer to read a text file: How to do that

Postby TJ » 28 Jun 2011

Excel's can handle update speed of about once every 2 seconds.


Return to “MultiCharts”