[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 143
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
What does a select order have to do with it?
We take the data from the indicator, orders are not involved here
You use OrderSymbol() -- Returns the name of the financial instrument for the currently selected order.
The order must be pre-selected using the OrderSelect() function.
Here is your code:
here CC1, CC2 receive values corresponding to the instrument of the selected orderif you gave us the entire code, we could tell for sure what the problem is instead of guessing
double MA13=iMA(NULL,..... etc
Why does MainBuffer[i] exceed 100? Where is the error?
you use OrderSymbol() -- Returns the name of the financial instrument for the currently selected order.
The order must be pre-selected using OrderSelect().
here is your code:
CC1, CC2 get values corresponding to the instrument of the selected orderif you cited all the code, you could tell for sure what the problem is instead of guessing
The interesting thing is that it gives the same values in all cases.
That is, it gives the same values for all characters.
MathMax and MathMin return the bar number, not the extremum itself
MathMax returns the maximum value of 2 values - High[i] and 0, if it encounters a High[i] greater than HighesBuffer[i] - it returns it.
MathMin returns the minimum value of 2 values - Low[i] and 99999, if bumping into Low[i] is less than LowesBuffer[i] - it returns it.
So you want to first calculate the value of a waving, i.e. some number, and then find out with what period it has been calculated? No, that won't work))
Not really... Is it possible to rely on some MA indicator(not necessarily the value). But I don't know how ...
What to refer to? And why?
there is a working MA (period can vary)
there is a separate function that uses the same period. For the beauty of the solution, it is necessary to refer to the MA, not its period.
you need to calculate the period of the MA...
That's more like it.
О! Well, of course you are. Something's got my eye. What a gross mistake!
Oh, thank you.