The script must be added to a live chart, and then once everything is loaded, the button can be pressed which will read the objects on the chart and write the CSV file.
There would not be a way to automatically create a chart and automatically apply the indicator on weekly intervals.
However, if you wanted to leave the script running on a chart and automatically export data to a CSV file on a timed interval, this would be possible if you modified the script so it triggers the CSV writing functionality off of a timer, or when using a time check in OnBarUpdate. Paul's script implements a ReadWrite() function to read the data on the chart and export to CSV.
To make Time and Day checks easier, you could consider using ToTime() and ToDay()
ToTime - https://ninjatrader.com/support/help...nt8/totime.htm
ToDay - https://ninjatrader.com/support/help...html?today.htm
We look forward to assisting.
Comment