Error 047: No bars to plot (how to solve this issue)

Posted By: anissyo

Error 047: No bars to plot (how to solve this issue) - 07/17/21 14:49

Hello friends, i use the script csvtohistory to convert csv files to t6 files, it is working great for forex data from histdata or crypto data from the binance api, now i decided to test data from another api for us intraday stocks, when i downlaod the data into a csv file and i enter the correct string format in the csvtohistory script i get this message as a result of the convertion :

2733173 lines read
D:\histo\historicalzorro\AAPL.US_historynew.t6



but when i try to open the file it's not working i get this message error :
Chart compiling.......... t6 AAPL.US_historynew
Error 047: No bars to plot


what i did so far to make things work but with no luck :


1) i test with this five string format :
string Format = "+%Y-%m-%d %H:%M:%S;f3;f1;f2;f4;f6";
string Format = "%Y-%m-%d %H:%M:%S;f3;f1;f2;f4;f6";
string Format = "-%Y-%m-%d %H:%M:%S;f3;f1;f2;f4;f6";
string Format = "+-%Y-%m-%d %H:%M:%S;f3;f1;f2;f4;f6";
string Format = "-+%Y-%m-%d %H:%M:%S;f3;f1;f2;f4;f6";


2) i added the symbol 'AAPL.US_historynew' to assetsfix.csv


3) i checked the order of the lines in the history file to see if there is any thing wrong in the time and date, but my python script returned that the order is 100% correct there is no problem related to time not being in consecutive order



after strugling for this for roughly 3 days, i ask the community for help, thank's in advance
Posted By: jcl

Re: Error 047: No bars to plot (how to solve this issue) - 07/19/21 12:35

We can't say it often enough: File names with special characters are always a bad idea. You can use underscore, but many windows software tools don't like dots, slashes, spaces, or similar.

It that's not the problem reason, look in the t6 file with the History script or the History Viewer. You can then probably see what's wrong, such as invalid time stamps or wrong order.

If all fails: We also have a data conversion service.
Posted By: anissyo

Re: Error 047: No bars to plot (how to solve this issue) - 07/25/21 17:47

thank's a lot jcl, i fixed the issue by reversing the order in the csv file, instead of going from older dates to recent ones, i did flipped the file so that the first line be came the most recent bar, and in the CsvtoHistory file i used this string format: "%Y-%m-%d %H:%M:%S;f3;f1;f2;f4;f6"

the + in front of the string format was not working for me for some reason..., i am going also to stop using any dots, slashes, spaces, or similar, only underscore

sorry but i have never seen this thing about correctly naming t6 files...

© 2024 lite-C Forums