Just a thought - for the 1-st scenario try to call CustomRatesReplace once a while for the history built with previous CustomRatesUpdate calls - probably this will pack the files.
CustomRatesUpdate is designed to update quotes "visually", and probably is not optimized for storage size.
Just a thought - for the 1-st scenario try to call CustomRatesReplace once a while for the history built with previous CustomRatesUpdate calls - probably this will pack the files.
CustomRatesUpdate is designed to update quotes "visually", and probably is not optimized for storage size.
I have tried the following cases:
1. CustomRatesReplace()
2. CustomRatesUpdate()
3. CustomRatesDelete() before CustomRatesReplace()
4. CustomRatesDelete() before CustomRatesUpdate()
Everything that runs in real time take up a lot of disk space and there is no difference between them
Don't know if there is a solution to this
You can try to verify your created/downloaded history data:
string _CustomSymbol = "Custom"+_Symbol; long tstart_server = SeriesInfoInteger(_CustomSymbol, PERIOD_M1, SERIES_SERVER_FIRSTDATE); long tstart_terminal = SeriesInfoInteger(_CustomSymbol, PERIOD_M1, SERIES_FIRSTDATE); long tlast_terminal = SeriesInfoInteger(_CustomSymbol, PERIOD_M1, SERIES_LASTBAR_DATE); Print("* ", _CustomSymbol); Print("Total number of bars for the symbol-period at this moment = ", SeriesInfoInteger(_CustomSymbol, PERIOD_M1, SERIES_BARS_COUNT)); Print("The first date in the history for the symbol-period on the server = ", (datetime)tstart_server); Print("The first date for the symbol-period at this moment = ", (datetime)tstart_terminal); Print("Lastbar date for the symbol-period at this moment = ", (datetime)tlast_terminal);
Are the information displayed correct ? especially total number of bars ?
you still can run the code I provided to see the information of your custom symbol, right ?
Are the information displayed correct ? especially total number of bars ?
yes
Version A (Run In 3 Mins, run after delete history)
You might want to verify file size in the custom folder:
<DATAFOLDER>Bases\<CUSTOM FOLDER>\history\<CUSTOM SYMBOL>\
and
<DATAFOLDER>Bases\<CUSTOM FOLDER>\history\<CUSTOM SYMBOL>\cache\
Notice there are .hcc custom symbol folder and its *.hc files in the cache folder.
Good luck.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I'm using CustomRatesUpdate() function. It costs up to 2-3GB of disk space on real time running interval 1 sec in 24 hours (version A) but while I copy M1 timeframe data from server then CustomRatesUpdate() from 8/2024 just in 7MB (version B).
CustomRatesReplace() also has the same effect
Version A (Causes problem):
Version A Result (in 1.5 hour):
Version B:
Version B Result:
I wonder if running CustomRatesUpdate() function will delete old records