Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1211

 
Igor Makanu:
the brackets can be removed, I wrote it to make reading the condition easier

I may have misinterpreted the situation or misunderstood, but this is not what is needed, it makes no sense, as the orders open the same way, once one has closed the condition on the signal is true and the other is opened and so on

 
Igor Makanu:
the brackets can be removed, I wrote the terms for easy reading
but thanks anyway, I'll try to solve it myself)
 
a.lxrn:

I may have misinterpreted the situation or misunderstood, but this is not the right one, it makes no sense, because the orders open the same way, as soon as one has closed the signal condition is true and the other is opened, and so on.

there cannot be a true condition in my example

drop the MA on the chart and put a vertical line at the intersection of the MA and the close price



where the vertical line is bar number 1 - there is a signal, and to the left will be bar number 2 - how is your condition: the closing price of the bar is greater than the MA?

there will be a signal once on this bar according to my condition:

if((Close[1] > ma && Close[2] <= ma)&& CountBuy() == 0)
 
Alexey Viktorov:

Here's a classic example of a non-mathematical mind-set.

a.lxrn: nothing personal, no offence meant. No offence taken.

So this is a sample of unconventional and original thinking...ha ha ha (don't know how to insert emoticons here)

 
a.lxrn:

)))) I am not a child to be offended)) I did not graduate from maths school) I am more of a humanitarian, but everyone started somewhere and everyone was as dumb as me)) that is why I am asking for help

You and I are kindred spirits. I didn't get any higher than arithmetic in school either. Maths and algebra were a dark forest for me. I thought I was the only one here....

 
ANDREY:

So this is an example of unconventional and original thinking...ha...ha...ha (don't know how to put emoticons in here)

)))))))))))))))))))))))))))))))
 
Mihail Matkovskij:

And post here what error it gives out.

Thank you. If you remove the last parenthesis at the bottom, you won't get an error. When the market opens, I'll check to see if it's working. Is your sound working?

 
ANDREY:

You and I are kindred spirits. I did not get any higher than arithmetic in school either. Maths and algebra were a dark forest for me. I thought I was the only one here....

Don't feel bad. I'm still on a roll with maths.
Remember Henry Ford's words about the right knowledge.
 
Artyom Trishkin:
Don't feel bad. I'm still on a roll with maths.
Remember Henry Ford's words about the right knowledge.

Artem, mathematics is one thing, but it is quite another thing to have a mathematical mindset. If a child with a mathematical mindset skipped lessons and did not do homework, he or she will not be friends with mathematics, but the mindset remains and, if necessary, will work exactly as it should. while the humanities often explain something like "See the trend up.........".

Didn't you smoke while everyone was learning maths:))))

I smoked while there were classes in geography, foreign languages, history, physical education and some others. I didn't really try to study maths either, it somehow worked itself out without any problems.

 
Alexey Viktorov:

Artem, mathematics is one thing, but a mathematical mindset is quite another. If a child with a mathematical mindset skipped lessons and did not do homework, he or she will not be friends with mathematics, but the mindset will remain and, if necessary, will work exactly as it should. while the humanities often explain something like "See the trend up.........".

Didn't you smoke while everyone was learning maths:))))

I smoked while there were classes in geography, foreign languages, history, physical education and some others. I didn't really try to study maths either, it somehow worked itself out without any problems.

To make algorithms, it seems to me, requires logic. And that is far from mathematics. And I'm not friends with it - only the right reference material and help from those who are.
Reason: