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
Help me understand how the indexing direction of the indicator buffer array is set here, i.e. the same as ArraySetAsSeries. The default direction is from present to past, but I need to make it from past to present. I've been struggling with this question since yesterday! Help!
It doesn't need it, as it uses the standard ZigZag.
Look for the place where the direction is set in this ZigZag , but it's still unclear why you need it - you can change the indexing direction yourself at any time - https://www.mql5.com/en/docs/series.
It doesn't need it, as it uses the standard ZigZag
In this ZigZag , look for the place where the direction is set. But it's still unclear why you need it - you can change the direction of indexing yourself at any time - https://www.mql5.com/en/docs/series.
Thanks for the information, we'll look into it!
It doesn't need it, as it uses the standard ZigZag
In this ZigZag look for the place where the direction is set. But still it's not clear why you need it - you can change the indexing direction yourself at any time - https://www.mql5.com/en/docs/series.
I'm sorry, but it's still not clear how to change the indexing direction, for example, if you don't have access to the Zigzag source. The indexing direction is set by ArraySetAsSeries() - where the input parameter is an array by reference,
but we don't have this array, but only a pointer to the indicator buffer array in the form of
Here is the full code of the indicator, where the output of indicator values is from the present to the past - and it is necessary vice versa
Sorry, but still not clear how to change the direction of indexing, for example, if there is no access to the source Zigzag. The indexing direction is set by ArraySetAsSeries() - where the input parameter is an array by reference,
but we don't have this array, but only a pointer to the indicator buffer array in the form of
The CIndicator base class has a GetData method, which can be used to get data from the indicator buffer.
Gets data from the indicator buffer by start position and number
int GetData(
const intstart_pos, // position
const intcount, // number
const int buffer_num, // buffer number
double&buffer[]// array
) const
After that, set the desired indexing direction for your array using ArraySetAsSeries
The CIndicator base class has a GetData method that can be used to get data from the indicator buffer.
Gets data from the indicator buffer by start position and number of
int GetData(
const intstart_pos, // position
const intcount, // number
const int buffer_num, // buffer number
double&buffer[]// array
) const
After that, set the desired indexing direction for your array.
So it turns out to access the indicator buffer twice, but in different ways? After all, here below we already have access to the values of the indicator buffer? We get an intermediate array double &buffer[] I understand you correctly?
The CIndicator base class has a GetData method that can be used to get data from the indicator buffer.
Gets data from the indicator buffer by start position and number of
int GetData(
const intstart_pos, // position
const intcount, // number
const int buffer_num, // buffer number
double&buffer[]// array
) const
After that, set the desired indexing direction for your array using ArraySetAsSeries
Have I understood you correctly?
It turns out that you need to copy the whole history on each tick?Am I understanding you correctly???
It turns out that it is necessary to copy the whole history on each tick?1. You can do it at the opening of a new bar
2. Why do you need to get all indicator values every time, and at the same time take care of the indexing direction? What is the task at all?
Why wrapping a simple indicator into a class if it is used later either in a chart or via iCustom?
Второе решение лучше, потому что является объектно-ориентированным
OOP for OOP's sake, okay.
1. It is possible to open a new bar
2. Why do you need to get all the indicator values every time, and at the same time care about the indexing direction? What is the task at all?
The problem was solved by the loop conditions, now everything works as desired. thanks!