Problem with export of quote times with DTN IQ Feed dat

Moderator comment: The poster DID NOT select Periodicity in the Analysis Settings. The reader may save time by NOT reading the post as it is clearly basic user error


I'm trying to export some 15 minute quotes from Amibroker. The data that I'm using is coming from DTN IQ Feed.
The export is good except that it doesnt get the time of the quote correct. For all quote the export says time is "00:00"
Code and output is attached. Have anyone else experienced the same problem, and if so, how did you fix it?

path = Name()+"15.csv";

fh = fopen(path,"w");

fputs ("Date,Time,Open,High,Low,Close\n",

y = Year();
m = Month();
d = Day();

hr = Hour();
mn = Minute();

for (i = 0; i < BarCount; i++)
	ds = StrFormat("%02.0f%02.0f%02.0f,",
	ts = StrFormat("%02.0f%02.0f,",
	qs = StrFormat("%.4f,%.4f,%.4f,%.4f\n",



You don’t tell anything about where you are applying the code.
So I can only guess the most obvious one…
You were applying it in analysis. Analysis interval setting is independently set from chart interval!
So just go to Analysis settings -> General <- tab and choose -> Periodicity <- there.

Change the path variable to

path = Name() + StrFormat( "%g.csv", Interval()/60 );

and see which number is part of the file name. If it is 1440 (minutes) then you have applied the code in Daily TF. So once again change interval to 15-minute then if that’s the one you are looking for.

PS: Alternatively use this path variable

path = Name() + "_"  + Interval(2) + ".csv;

As for your post in general

  1. You still don’t know how to insert code properly.
  2. You have got 15 minutes time to correct a post after you have clicked reply button.
  3. You don’t take enough the time to find out how to post code properly before clicking reply button.
  4. You even have a preview in forum editor.

Please re-read “How to use this site” thread!

Once again the easiest way to insert code is clicking </> button of the forum editor toolbar. Then a place holder text will show up where you place your code instead of it. Before posting check preview. How much easier could it be? I don’t understand the “difficulty” about it. :sob: