Offline charts and chart templates

 
Hi there,

Quick question regarding an offline chart.

I have created a script that creates an FXT file and updates it every second in realtime, effectively creating a 1 second history.

I can open the FXT file as an offline chart and display it. When I refresh the chart and any updated 1 second records that have subsequently been added by my script are displayed fine, which is great.

If I open the offline chart and apply a chart template it also displays as expected.

If I refresh the chart after applying the chart template though it refreshes the chart with live history data and not the with data contained in the FXT file from which the offline chart is derived.

I have checked the template and the offline flag is set correctly.

Why does this happen?

If I open the offline FXT file and immediately create a template and refresh the the offline contents are preserved. If I then load the template I just created and refresh then the chart switched to live data.

This happens with FXT files created with EA also.

Any advice on how to overcome this behaviour would be greatly appreciated.

Regards,

Laurence.

However
 
"If I refresh the chart after applying the chart template though it refreshes the chart with live history data and not the with data contained in the FXT file from which the offline chart is derived."

Was the chart template saved using offline chart, or online chart?

Another thing. What is the Symbol for your created tick pair? If it is the same as a real pair name, you may create a conflict.
 
I have created chart templates based on both live and offline charts and the result is the same. Irrespective of what template you apply if you apply it to an offline chart ane then refresh the chart it refreshes with live data.

I am using GBP/USD, I don't know if this is a problem. It isn't normally since when one views an offline chart the chart is getting its data from the FXT file and not from the live server.
 
"I am using GBP/USD, I don't know if this is a problem. It isn't normally since when one views an offline chart the chart is getting its data from the FXT file..."

Normally, offline reads from an HST file in /history. You are doing something a little different.

FXT are intended to be MT4 generated pseudo-tick files for use with the Strategy Tester, and are stored in /tester/history

Write your one second ticks to an HST file in /history, and give the file a name different from the "real" pair, like GPDUSD_T

Maybe all you need is the unique name. But I do what is listed above and don't have your problem at all.
 

Normally, offline reads from an HST file in /history. You are doing something a little different.

FXT are intended to be MT4 generated pseudo-tick files for use with the Strategy Tester, and are stored in /tester/history


If FXT files aren't really supposed to be opened as offline files then why does the Open Offline Chart dialog box allow you to do so?

Here is a pretty direct example that I hope you can to replicate.

Run the Moving Average EA against GBPUSD, M1, for dates 4/Feb - 5/Feb and select the every tick model.

When the EA has run select File, Open Offline. Scroll to the bottom of the list of available data and you should see an entry GBPUSD,M1 (every tick). This is the FXT file that has just been created by running the EA.

Select this entry and a chart window will open up. You should see the last bar on this chart is 4/Feb 23:59 or pretty close to that. This is as one would expect.

Refresh the chart, nothing happens.. Refresh it again and again, nothing happens. This is what we expect to see because this is an offline chart and since its data comes from a static FXT file there is no new data to refresh.

Save the offline chart as a template and call the test.tpl.

Immediately load the test.tpl template into offline chart. Remember this template has just been created from the offline chart itself.

Now refresh the offline chart and you should see it refresh with live data.

Are you able to duplicate this? If so why does the offline chart refresh with live data? Surely offline data should be static.

Regards,

Laurence.
 
If the name of your tick security is the same as the name of a real security, there may be a conflict, and it refreshes with the HST file and not the FXT file.
 
If the name of your tick security is the same as the name of a real security, there may be a conflict, and it refreshes with the HST file and not the FXT file.


OK, I can change the name of the symbol in the FXT file no problem.

I can then open the FXT file as an offline file and it displays the chart fine.

I can save the chart as a template OK also.

If I load the template I just saved into the chart it displays OK.

However when I then do a refresh the screen changes to Waiting for Update supposedly because the symbol name isn't one that the server recognizes.

There doesn't seem to be any way around this.
 
I have 1 second files working just fine, as type HST, not FXT
 
I have 1 second files working just fine, as type HST, not FXT


Could you email me one of you 1sec HST files so I can test it out. If it works then I shall use HST files instead of FXT files.

my email address is lhookway@uk2.net

Regards,

Laurence.
 
Comments that do not relate to this topic, have been moved to "Off Topic Posts".
Reason: