Errors, bugs, questions - page 984

 

Forum on trading, automated trading systems and trading strategy testing

Bugs, bugs, questions

tol64, 2013.05.05 19:21

I have understood it, but I have not solved my problem. I have not solved it yet. It occurs rarely and on weekends (when the ticks do not come) when switching timeframes/symbols. The indicator series is sometimes not displayed either in the Data Window Navigator or on the chart, but the data can be retrieved programmatically. It looks like this:

...

//---

I thought first that if the subwindow does not show and in the Data Window Navigator too, it means that the buffers are empty(empty_value) and by checking it may call OnCalculate() to update. But it didn't work as the melons are in the buffers.

Is this a bug?

Manually it gets fixed quickly by switching timeframes. I would of course like to not have to explain it to the users, but solve it neatly programmatically. Has anyone encountered such a problem?

If it is not a bug, then we need a way to determine that the graphical series of the indicator are not displayed in the subwindow (and in the Data window, too). How to do this is unclear, as it is possible to get them programmatically. Next, after determining that there is nothing in the subwindow, we call OnCalculate() in the timer to recalculate by zeroing the variable prev_calculated.

The following is written in the Help:

To do this, it is usually sufficient to return the value of the rates_total parameter, which contains the number of bars in the current function call. If since the last call of OnCalculate() price data were changed (a deeper history was pumped or history blanks were filled), then the value of the input parameter prev_calculated will be set to zero by the terminal.

Note: if theOnCalculate function returns zero, the indicator values are not displayed in the client terminal DataWindow.

In my case all calculations have been performed (they can be started only after all the checks) and OnCalculate() returns a non-zero value, therefore the data can be obtained programmatically. But this is not consistent with what is written in the Help.


 
Question for management. Do you have a demo server for MT5, where 1 lot = 10 000 (not 100 000 USD), min lot = 0.01, step = 0.01? I would like to optimise my EA for cent accounts. On those MT5 cent accounts that I found from brokers min. lot = 0.1, while I'm looking for one with 0.01.
 

In the source code of the standard library I found the following construction

//+------------------------------------------------------------------+
//| Constructor |
//+------------------------------------------------------------------+
void CMoneyFixedLot::CMoneyFixedLot(void) : m_lots(0.1)
{

}

What is this? :)

Документация по MQL5: Стандартная библиотека
Документация по MQL5: Стандартная библиотека
  • www.mql5.com
Стандартная библиотека - Документация по MQL5
 
ns_k:

In the source code of the standard library I found the following construction

//+------------------------------------------------------------------+
//| Constructor |
//+------------------------------------------------------------------+
void CMoneyFixedLot::CMoneyFixedLot(void) : m_lots(0.1)
{

}

What is this? :)

What do you mean?
 
uncleVic:
What do you mean?
What it does, I understand. Rather, I mean where in the doc it says to use this kind of syntax, what is it called, e.g.
 
ns_k:
What it does, I understand. Rather, I mean where in the doc it says to use this kind of syntax, what is it called, for example
it's
 
uncleVic:
there
found it, thank you!
 

Forum on trading, automated trading systems and trading strategy testing

Bugs, bugs, questions

tol64, 2013.05.06 02:38

...

In my case, all calculations have been done (it is possible to do them only after all the checks) and OnCalculate() returns a non-zero value, so the data can be obtained programmatically. But this does not agree with what is written in the Help.

Application #740856.

So, there is some other reason why the indicator values may not be displayed, even if the buffers have been filled and OnCalculate returned a non-zero value.


 
Accidentally discovered. If you double click on an empty space in the order window, the tick chart is hidden. Is this a bug or a feature? )
 
ns_k:
Accidentally discovered. If you double click on an empty space in the order window, the tick chart is hidden. Is this a bug or a feature? )
A bug. Of course, it would be better to have a button to find this feature not by accident.