Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Exporting print content to csv or txt file real time
I have written an indicator to keep track of the last closing price from each interval and export it as a text file to the designated folder.
The indicator works perfectly in the offline environment when not connected to a live server. It updates and prints the content into the text file with the current time, even though it doesn't receive any new feed in the offline environment.
However, when I use the same indicator on my live server, it calculates in the background as I can see from the Output, but it does not export the text file to the folder unless I toggle it off or remove it from the chart.
The example output in the offline environment was calculated in real-time.
your code works fine here in realtime. When I understand your statement "it does not export the text file to the folder unless I toggle it off or remove it from the chart" correctly, the data is written as soon as you change the status of the indicator. If this is correct, this might indicate a problem outside of your code and MC. Do you see the same behavior when you test your code with realtime data on a desktop computer?