Limit to 200 barCount in loop

There is a far simpler way to create an export. Just write an Exploration, run it, then File / Export HTML/CSV to export it. Or use Batch to automate its export. You can set the start and end dates and periodicity in the Analyser settings.

The coding becomes far simpler. Eg

Filter = 1;
AddColumn(Open, "Open", 1.5);
AddColumn(High, "High", 1.5);
AddColumn(Low, "Low", 1.5);
AddColumn(Close, "Close", 1.5);
AddColumn(Volume, "Volume", 1.0);

This example uses 5 minute periodicity, so it's one row per 5 minute bar. 1 minute periodcity will give you one row per 1 minute bar.
image

Also, please read and follow the rules in How to use this site when posting code snippets.

1 Like