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 remembered my question to Renate. Can someone clarify what was meant by:
If I use IndicatorRelease(), then I am making a huge and conceptual mistake.
Why?
Because the comment was given by Renat in relation to the specific situation of using IndicatorRelease(), namely: Carlson created and deleted indicator handles on every tick.
See the discussion here: https://www.mql5.com/ru/forum/1111/81949#comment_81949
Because the comment was given by Renat in relation to the specific situation of using IndicatorRelease() function , namely: Carlson created and deleted indicator handles on every tick.
Look at the discussion here: https://www.mql5.com/ru/forum/1111/81949#comment_81949
At that time it was a question of the average period adapting to the market during operation. According to certain criteria the average period was changed. The old handle was deleted. A new one was created.
At that time the question was about adapting the averaging period to the market during the operation. According to certain criteria, the period of the average was changed. The old handle was removed. The new one was created.
Due to the specifics of creating our own indicator flow, this solution is unacceptable, this issue has already been discussed in the early days of the language (during beta testing).
In this case, it would be reasonable to transfer the calculation of the indicator to the Expert Advisor and calculate only the latest data, not the entire array of historical data. Of course, there is a complication here, such a solution does not allow to use ex5 indicators without knowing the code and requires understanding of the algorithm of calculation (in order to transfer it and adapt to new requirements).
Or the second option, the averaging period itself should be calculated within the indicator, and then the handle should be changed.
And what solution did you choose?
In reality, in my case, optimizing more than once a month makes no sense. It is worth it to develop something... For me it is not important. At first I only created handles, but I was prompted to remove them. I started removing them. Renat commented on it :) In general, it is written that unused handles are deleted over time, probably creating a new one once a month is not critical, but never mind:
1.install self-adaptation on the genetics, as in Rich's article
https://www.mql5.com/ru/articles/334
But I don't have enough knowledge here and I don't see any particular purpose.
2) Calculations should be done directly in the Expert Advisor without handles, I should thank the SMA.
3.Use AMA or Vidya, that was done in the new versions.
But these are all my private solutions, they do not solve the problem.
But these are all my private solutions.Not decisive.I think Urain has answered the question.
Afternoon
How to use TimeSeries.mqh library, in particular CiOpen class ....
For example: Chart - H1, instrument - "EURUSD"... get opening price from current - H1 and higher timeframes - H4 and D1 bar #5 .....
Now a thought out loud...
- attach library file
#include <Indicators\TimeSeries.mqh>
- Declare an array:
double Open[];
- create an instance of the class:
(or maybe it's "more correct" this way...?):
- create an instance of the time series:
.... and then it's not clear.... GetData method returns either -1 or >= 0 - (but I need the open price value of bar 5)
Question 1. Where to look for the (with so much effort) open price data (in what place of the array Open[] )...????
Question 2. For a D1 timeframe I have to declare another array and create my own class instance (or I can do with just one)... ????
Regards, erkov.....
Hello.
Could you please tell me how to set a vertical line on a chart at a certain point?
Thank you.
Hello.
Could you please tell me how to set a vertical line on a chart at a certain point?
Thank you.