Text or XML File

Section for discussions related to indicators, use of indicators, and building of trading stategies using indicators.

Moderator: admin

Text or XML File

Postby MrRiversideDude » Sun Sep 21, 2014 8:29 am

Are there any code examples of reading an external text or xml file from a strategy?

Thanks in advance!
MrRiversideDude
 
Posts: 87
Joined: Fri Feb 21, 2014 7:50 am

Re: Text or XML File

Postby Valeria » Mon Sep 22, 2014 11:04 am

Hi MrRiversideDude,

Sure, please use this snip of code:

Code: Select all
local f = io.open('c:\\1.xml', 'r')
    local xml = f:read('*all')
    f:close()
Valeria
 

Re: Text or XML File

Postby MrRiversideDude » Wed Sep 24, 2014 12:05 am

Thanks. But any more examples? I want examples on stepping through the file and capturing values?

Thanks in advance.
MrRiversideDude
 
Posts: 87
Joined: Fri Feb 21, 2014 7:50 am

Re: Text or XML File

Postby Valeria » Fri Sep 26, 2014 12:27 am

Hi MrRiversideDude,

You can learn more examples here.
Valeria
 


Return to Discussions

Who is online

Users browsing this forum: No registered users and 12 guests