[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 485
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
But for some reason the EA often opens an order of the wrong type!
Please, tell me where there is a mistake!
At SL the EA should open an order of the same type and at TP of the opposite type!
But for some reason the EA often opens the order of the wrong type!
Can you tell me where the mistake is?
и не понятно, что именно вы хотите получить в массивах MAX и MINкакова размерность массива x10 ?
10?
Тогда надо так переписать:
Let me explain again :)
There is an array that contains all values of MACD columns.
We need to take from all those values a dozen of values (in order) and look for the maximum value in them, and respectively draw it in the indicator, and so on to the end.
Here is the code once again:
As I see it, it's not drawn because the index of array with tens doesn't coincide with the index of this value in the main array with MAKD values.
In other words, when counter reaches, say, 30 in main loop, then in subcycle will go 30-31-32...39 (let's assume, maximal of them will be 34 value), function Arraymaximum(x10) will find it, but will write in IndexMAX exactly ordinal number in HIS (x10) array, i.e. actually true value will be 34, but it will write some other one (from 0 to 9, because it's an array of tens). I can't figure out what to do...
Let me explain again :)
There is an array that contains all values of MACD columns.
We need to take from all those values a dozen of values (in order) and look for the maximum value in them, and respectively draw it in the indicator, and so on to the end.
Here is the code once again:
As I see it, it's not drawn because the index of array with tens doesn't coincide with the index of this value in the main array with MAKD values.
In other words, when counter reaches, say, 30 in main loop, then in subcycle will go 30-31-32...39 (let's assume, maximal of them will be 34 value), function Arraymaximum(x10) will find it, but will write in IndexMAX exactly ordinal number in HIS (x10) array, i.e. actually true value will be 34, but it will write some other one (from 0 to 9, because it's an array of tens). I can't figure out what to do...
Show all the code for the indicator
Весь код индикатора покажиLet me explain again :)
I think you meant to write like this:
What's your goal?
Well, what do you want to get. Breaking it down into tens is pointless. They move around in time all the time.
мне кажется, Вы хотели написать вот так:
Doesn't draw :((.
s.w. k=0 I finished it :)
А какую цель преследуешь?
Ну, что хочешь получить. Разбивать на десятки бесмысленно. Они все время передвигаются во времени.
Yes the aim is literal...I want the maximum to be displayed amongst every 10 bars...