[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 404
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
Crossing is easier and quicker to check in another way
The speed is higher. Logical complex expressions take longer to execute than simple ones. Multiplication is faster than logicalThanks Vinin, what about the number of trades, can you write them to be only 1.2...N, after crossing the MA.
Пересечение проще и быстрее проверять по другому
Скорость работы выше. Логические сложные выражение выполняются дольше простых. Умножение быстрее логическогоanother option, but I don't think the questioner will understand it yet
Thanks Vinin, what about the number of trades, is it possible to write them only 1.2...N, after MA crossing.
Apparently we need to consider additional conditions for entry.
And count the number of open positions.
But it will have little relation to crossovers.
Because maybe in one case there was only one signal, in the second case there were 10.
But we should determine the conditions for an additional entry first.
Apparently there are additional entry conditions to consider.
And count the number of open positions.
But it has little relation to the crossover.
Because maybe in one case there was only one signal, in the second case - 10.
But first we should define the conditions for the additional entry
OK, I will try to look deeper, many thanks to Vilin and sanyooooook for the help.
double Lots;
double m = 0.1;
for (m = 0.1; AccountFreeMarginCheck(Symbol(),OP_SELL,m)>150; m = m + 0.1)
{
Lots = m;
}
Why do my Lots always turn out to be zero?
double Lots;
double m = 0.1;
for (m = 0.1; AccountFreeMarginCheck(Symbol(),OP_SELL,m)>150; m = m + 0.1)
{
Lots = m;
}
Почему у меня Lots всегда оказывается равен нулю?
Is the loop executed or is it immediately exited by the condition?
https://docs.mql4.com/ru/basis/operators/for
Expression1 describes the loop initialization. Expression2 is a check for the loop termination condition. If it is true, the loop body for is executed. Everything repeats until expression2 is false. If it is false, the loop is terminated and control is given to the next operator. Expression3 is calculated after each iteration.
for(expression1; expression2; expression3)
operator;
Good evening. I have a problem with the terminal, I can't fix it in any way:
I load MT4, load a template, draw trend lines, and when I switch TFs, the lines disappear, incl. they are not displayed on the original timeframe either. At the same time, the rest of the chart (horizontal, vertical lines, channels, all the Fibos, etc.) works fine. On a clean ("template-less") chart, the layout is preserved completely, everything worked fine before on the same indulators. Expert Advisors and Expert Advisors have been disabled. I work mainly on the chart, help me out!!!
Hello,
How do I make my EA not close a trade before 3 min?
Can anyone advise what and where to prescribe?
You have to start with logic. What you wanted to get and how you wanted to get it.
Well, I think the logic is explained in the comments...
I took out the returns and it went like this:
It seems to work, but I don't know if the code is correct... If anything is wrong, can someone correct it?