Anyone who wanted to see charts without missing bars - here =) - page 8

 
komposter, I have the following suggestion to fight with the terminal.
If you set attributes of file WS_EURUSDm1440.hst to read only, then at terminal startup terminal also swears in logs, but file CANNOT be modified! The file shows up fine on the chart as it did before the terminal was switched off.
So, I think, what if I make some external DLL, that can change attributes of WS_EURUSDm1440. hst file for reading/writing? That is, when an Expert Advisor needs to add a bar to the history, it calls a DLL, that sets the attributes of history file for writing, the Expert Advisor writes the bar and then calls the DLL again, so it sets the attributes of history file for reading only. Of course, I understand that in this case no one can give a 100% guarantee, but I think that in 95% of cases turning off / on the terminal will happen without breaking the history bar by the terminal. I don't have a power outage more than 2 times a month and I'd be fine with that.
 
solandr писал (а):
komposter, I have the following suggestion to fight the terminal.
No, this is quite sad...
Actually, I've already figured out why the terminal is overwriting the file.
I just don't understand by what right the terminal is touching my offline chart...

OK, if the error is in the normal timeseries - I have to update it. But this ismy file. I write what I want.

Anyway, never mind...
I will try to make a working version of EA today.
 
You know what the saddest part is? =)
I had 3 bars with a time of 23:00 on the story I was testing. All the others were 00:00, and these 3, damn it...

All in all, a mistake in the history (by the way, my "wrong" file with diaries starting at 23:00 MT corrects, but the honest history does not =))).

Anyway, the showdown didn't go in vain - dug up a little bug ;)
solandr, try a fresh version.

If bugs persist, check history.

And if it still remains, tell me, I'll dig further ;)
Files:
 
komposter писал (а):
In general, a history error (by the way, my "wrong" file with diaries starting at 23:00 MT corrects, but an honest history does not =))).

Anyway, the showdown didn't go in vain - dug up a little bug ;)
solandr, try a fresh version.

If the bugs persist, check the history.

And if it still remains, tell me, I'll dig further ;)


Unfortunately no prinitial changes :o(. Also swear in logs and the same charts with Digits=0.
2006 11/11/02 11:45:16 HistoryBase: 42 errors in 'WS_NZDUSDm1440'
2006.11.02 11:45:16 HistoryBase: 271 errors in 'WS_EURJPYm1440'
2006.11.02 11:45:16 HistoryBase: 271 errors in 'WS_EURCHFm1440'
2006.11.02 11:45:16 HistoryBase: 272 errors in 'WS_AUDUSDm1440'
2006.11.02 11:45:16 HistoryBase: 271 errors in 'WS_EURGBPm1440'
2006.11.02 11:45:16 HistoryBase: 272 errors in 'WS_USDJPYm1440'
2006.11.02 11:45:16 HistoryBase: 272 errors in 'WS_USDCADm1440'
2006.11.02 11:45:16 HistoryBase: 272 errors in 'WS_GBPUSDm1440'
2006.11.02 11:45:16 HistoryBase: 78 errors in 'WS_CHFJPYm1440'
2006.11.02 11:45:16 HistoryBase: 272 errors in 'WS_USDCHFm1440'
2006.11.02 11:45:16 HistoryBase: 272 errors in 'WS_EURUSDm1440'

You should try to open several offline charts at once to see the error more quickly.

How do you check history? This is history, which terminal honestly pumped by itself via long press on Home key. I haven't imported anything into it. Maybe you may take a look at it and say something about it? The history file is attached.

PS: Of course I can make an assumption that the history, which is stored on the server at the broker has some errors, such as big "spikes" on the charts, as well as gaps in quotes for several days, but the following question arises. Why does the terminal not display errors when working with it and only returns errors when the history has been corrected through a simple conversion and ONLY after making sure that the chart of the corrected history is displayed correctly, even though the terminal writes errors in the logs? What can the developers say about the possibility of making the terminal friendly with this Expert Advisor?
Files:
history.zip  681 kb
 
solandr:
Unfortunately no prinitial changes have occurred :o(. It's also scolding in logs and the same charts with Digits=0.
You should try to open several offline charts at once to see the error quicker.
OK, will continue the fight today ;)

How do I check the history? This is the history, which the terminal honestly downloaded on its own by means of a long press on the Home key. I haven't imported anything into it. Maybe you can take a look at it and say something about it? Attached is the history file.

I had a "fair" story too. All the D1 bars start at 00:00 and the 3 bars start at 23:00.
MT did not react to this in any way.
But the off-line chart identical to the honest one, MT rejects it.

That is, I purposely tried to remove all conversions from the code and just copied the history - MT says errors...
 
solandr:
Unfortunately no prinitial changes have been made :o(. Also it's swearing in the logs and the same graphs with Digits=0.
Try ;)
Files:
 
komposter писал (а):
Try it ;)

Great! Now the terminal doesn't seem to print any errors and the charts open correctly after restarting the terminal. If it's not a secret, how did you manage to beat the terminal?

But unfortunately one unpleasant thing has remained. Expert Advisors do not work on a separately opened chart :o((((.
For example, this EA does not print anything:
//+------------------------------------------------------------------+
//|                                                          bid.mq4 |
//|                      Copyright © 2006, MetaQuotes Software Corp. |
//|                                        https://www.metaquotes.net// |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, MetaQuotes Software Corp."
#property link      "https://www.metaquotes.net//"
 
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//----
   Print("Bid=",Bid);
//----
   return(0);
  }
//+------------------------------------------------------------------+
Is it possible to stimulate the launching of Expert Advisors on an autonomously open chart, otherwise the whole sense of these efforts, unfortunately, is lost? Although indicators and scripts seem to work normally on autonomously open charts.
However, I should thoroughly check it. If the indicators work properly, the Expert Advisor can be divided into two components. The first one is the indicator on a stand-alone chart and the second one is the Expert Advisor that manages orders and receives data through global variables of the terminal from the indicator. However, I do not know what would be easier. Should I consider Sunday bars in my EA without considering them in calculations or divide the real EA into 2 parts? I want it to be as human-like as it was intended, not as the EA will have to act in case it will not work on autonomously opened charts.
 
solandr:
Great! Now the terminal doesn't seem to print any errors and the charts open correctly when the terminal is switched on again. If it is not a secret, how did you manage to beat the terminal?

But unfortunately one unpleasant thing has remained. Experts do not work on the autonomously opened chart :o((((.
Secret =)

And EAs don't work on offline charts at all.
I mean the start() function does not work.

The solution is to put all code into a loop:
int init()
{
   start();
}
int start()
{
   while (!IsStopped())
   {
      //код эксперта
      Sleep(10);
   }
}
 
komposter писал (а):

The solution is to put all the code into a loop:


In principle, the solution is quite logical because the scripts run successfully.
But it is still not clear why it was not possible to allow EAs to work on offline charts? Can you give a link to official information of developers that they did this for some specific reasons and will not reconsider their position? I must not have looked it up properly?


Thanks in advance!

 
solandr:

But it is still not clear why EAs could not be allowed to work on offline charts? Could you provide a link to official information from the developers that they did this for some specific reasons and will not reconsider their position? I must not have looked for it properly?

I tried to find it and failed.
But the information was, that's for sure )
Reason: