How to set program to save chart's data?

 

I would like to save chart's data for every 15 minutes, now I need to manually press Ctrl+S to save chart's data into csv file.

Does anyone have any suggestions on how to do it in MT4?

Thanks in advance for any suggestions

 

I am a first time user, and find following coding, but don't know how to apply for my case.

I would like to save chart's data for every 15 minutes, now I need to manually press Ctrl+S to save chart's data into csv file.

Does anyone have any suggestions on how to do it in MT4?

Thanks in advance for any suggestions

if (handle>0) {
      FileWrite(handle, 
            TimeToStr(TimeCurrent(),TIME_DATE|TIME_SECONDS),
            GetTickCount(), 
            Ask, 
            Bid
      );
 

Does anyone have any suggestions?

Thanks in advance for any suggestions

 

Does anyone have any suggestions?

Thanks in advance for any suggestions

 
oem7110:

I would like to save chart's data for every 15 minutes, now I need to manually press Ctrl+S to save chart's data into csv file.

Does anyone have any suggestions on how to do it in MT4?

Thanks in advance for any suggestions

Well I suggest you expand on your original request rather than repeating the same question.

I tried the Ctrl+S method and it produced 2 months worth of data in the csv file even on an M1 chart. Why then would you want to repeat the process every 15 minutes. It doesn't make any sense ... so far. Do you just need to increase the size of the chart storage?

 
dabbler:

Well I suggest you expand on your original request rather than repeating the same question.

I tried the Ctrl+S method and it produced 2 months worth of data in the csv file even on an M1 chart. Why then would you want to repeat the process every 15 minutes. It doesn't make any sense ... so far. Do you just need to increase the size of the chart storage?

I am a beginner in MT4 with little programming background, if you can give me any suggestions on how to do it in MT4, then it will be a great help.

Do you have any suggestions?

Thanks everyone very much for any suggestions

 
oem7110:


I need to update data on every 15 minutes for analysis on 15 minutes time frame, do you have any suggestions on how to code it in MT4?

I am a beginner in MT4 with little programming background, if you can give me any suggestions on how to do it in MT4, then it will be a great help.

Do you have any suggestions?

Thanks everyone very much for any suggestions

Well the problem is you are not making any sense to me. You want to update data to a text file every 15 minutes. Why? Why do you want to put the data into a text file when you already have the data on the chart? Are you trying to analyze it with an excel spread sheet or some such thing? In which case just do the analysis in MQL4 instead.

Really if you would just spend some time and write out what you actually want to do (and WHY) in more than one sentence then you might be able to get a useful answer.

 
dabbler:

Well the problem is you are not making any sense to me. You want to update data to a text file every 15 minutes. Why? Why do you want to put the data into a text file when you already have the data on the chart? Are you trying to analyze it with an excel spread sheet or some such thing? In which case just do the analysis in MQL4 instead.

Really if you would just spend some time and write out what you actually want to do (and WHY) in more than one sentence then you might be able to get a useful answer.

The issue is not why to do it, but how to do it, so do you have any suggestions on how to code MT4 for saving chart's data for every 15 minutes automatically?

Thanks everyone very much for any suggestions

 
oem7110:

The issue is not why to do it, but how to do it,

No, the issue is why you do it (your requirement) NOT how you do it (your implementation). If your Implementation is wrong for your requirement the best solution is a more appropriate implementation . . . how can anyone ascertain that without knowing your requirement ?
 
RaptorUK:
No, the issue is why you do it (your requirement) NOT how you do it (your implementation). If your Implementation is wrong for your requirement the best solution is a more appropriate implementation . . . how can anyone ascertain that without knowing your requirement ?


I think it is the wrong place to ask question, to justify what right and wrong is user (me). If people don't understand user requirement, then don't do it, nobody want you to do it, right

Does anyone have any suggestions?

Thanks everyone very much for any suggestions

Reason: