Questions from Beginners MQL5 MT5 MetaTrader 5 - page 834
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
Please explain what the problem is. The function is supposed to look through all open positions and calculate the number of positions with a given magic number. In fact it only picks one from the list opened by another EA with the same Ticket and Magik and therefore count is always =0.
I've figured it out myself, the selection has to be done viaPositionGetSymbol:
I've figured it out myself, the selection has to be made usingPositionGetSymbol:
Not well figured out. You have to select on the hadge account using the PositionGetTicket(i) function and then check the symbol and the magik.
It's not good to figure it out. You have to select on the hadge account with the PositionGetTicket(i) function and then check the symbol and magik.
Yeah, that's better, the other functions were glitchy in the demo too, but now it works.
Hello, could you advise me on this indicator https://www.mql5.com/ru/forum/94447#comment_6780067
It puts red and blue circles on the chart when the price changes drastically, i.e. when the price changes 4 pips or more,
I need these signals to go only when the price changes by 10 pips or more
Hello, could you advise me on this indicator https://www.mql5.com/ru/forum/94447#comment_6780067
It puts red and blue circles on the chart when the price changes drastically, i.e. when the price changes 4 pips or more,
I want these signals to go only when the price changes by 10 pips or more.
This indicator calculates not pips, but sigma or RMS (root-mean-square deviation). On a sample of the last N ticks (50 by default). It builds a channel of 3 sigmas. If price has jumped out of the channel, it will mark this place. But the main problem is that the initial price series has not normal distribution with very heavy tails. In fact, this indicator is a toy-help.
Hello.
I'm writing a small program. I'm faced with a completely unintelligible situation.
In my code, there are these two lines. They are at the very end of OnTester() and are not in the loop.
And here is an unexpected result of executing these lines.
Here is the definition of theMatOgidanieStavk function
Hello.
I'm writing a small program. I'm faced with a completely unintelligible situation.
In my code, there are these two lines. They are at the very end of OnTester() and are not in the loop.
And here is an unexpected result of executing these lines.
Here is the definition of theMatOgidanieStavk function
Stavka is initialized before the print?
how is it determined that the call is the first inside the function?
what result did you expect?
Thank you. I solved the problem.
It turned out that theStavka variable before Print. was equal to -1. Its value was passed into the Print function and saved as a copy. My functionMatOgidanieStavk changed theStavkavariable itself, not its copy that will print.
2795/2797 will be 0. Because rounding is not performed. Either s3 = (double)s2/s1; or select double for s2 and s1