You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I think it would be easier to re-do the Expert Advisor or work on it with a file.
I think it would be easier to describe in full what you want from the Expert Advisor and provide all code created by VISARD.
For example, I need an Expert Advisor that opens trades by crossing the price of an Envelopes indicator. This is what I got:
Question about indicators.
There is such a construction of input parameters in OnCalculate:
All this fun is tied strictly to the current timeframe, therefore to get to the similar data of another timeframe, you can, for example, call the handle of the required built-in standard indicator on the desired timeframe:
and then copy the necessary data into the buffers through the Copy-functions variations.
Everything would be fine, but there is a need to use rates_total and prev_calculated on different from current timeframes. And there are none of them, as far as I understand. Where and how can we get them if they obviously do not correspond to the current timeframe?
Of course, there is a clear explanation in the help:
"We need to note the relation between the value returned by OnCalculate() and the second input parameter prev_calculated. The parameter prev_calculated, when the function is called, contains the valuereturned by OnCalculate() on the previous call. This allows for economical algorithms for calculating the custom indicator in order to avoid repeated calculations for those bars that haven't changed since the previous call of this function.
For this, it is usually enough 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."
So, do we really have to manually implement our own analogues of rates_total and prev_calculated for other timeframes using the principle described above? Or is there something ready to be used? Well, for example, like this:rates_total = BarsCalculated(handle);
or take the returned value of the Copy-function. But with prev_calculated there would be, to put it mildly, not so easy... How to implement it correctly?I read Rosh's article about the mathsat https://www.mql5.com/ru/articles/1492.
There is a possibility to connect such analysis for example in OnTester() ?
Are there any ready-made solutions freely available?
I read Rosh's article about the mathsat https://www.mql5.com/ru/articles/1492.
There is a possibility to connect such analysis for example in OnTester() ?
Are there any ready-made solutions freely available?
Yes - Testing Statistics
Can you advise?
I selected a deal from the history,the direction of the deal is "pivot" (in/out), then I determine the volume of the deal HistoryDealGetDouble(ticket,DEAL_VOLUME).
I get the total volume, but how to know which volume I closed and which opened? I want to know what volume I closed and what volume I opened. Thank you.
Yes - Testing Statistics
I've written a linear regression. Are you planning to add such a thing to the terminal, and even to display it on the chart in the tester?
And as understood to calculate the Z-count is required to independently calculate the total number of positive and negative series?
And I also understand that calculating the Z-count requires calculating the total number of positive and negative series by yourself?