Questions from Beginners MQL5 MT5 MetaTrader 5 - page 463
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
How to get the position volume to 0 (zero)? (FORTS, Otkrytie-Broker, Real)
We have the following code:
That is, we open a position with an order, close it with a reverse order, and look at the position volume as a result.
We expect 0 (zero) and have 1 (one). Logs below (beginning below).
What is the reason?
How to get the position volume to 0 (zero)? (FORTS, Otkrytie-Broker, Real)
We have the following code:
That is, we open a position with an order, close it with a reverse order, and look at the position volume as a result.
We expect 0 (zero) and have 1 (one). Logs below (beginning below).
What is the reason?
Exactly right. When I wrote this formula, my SL was not defined by a predefined value, but was calculated as the difference between the order open price and some level, so I had to multiply the risk amount by _Point
Hello all! I can't cope with one problem... Please help!!! There was an Expert Advisor with Martingale (2SS), I reworked almost everything - now it also opens by Trend. There is a block counting accumulated profit of separately closed orders and reset to "0" - when the whole series was closed, and in particular the 1st open order. Now this 1st order may close at any time... And the accumulated profit is nullified. TASK: Hold this flag (series openings) until ALL orders are closed after this flag has "appeared". In the source code, it looked like this:
Thank you in advance!
Then divide, not multiply.
You did not look carefully at my variant, I did not multiplied the stop, although it is indeed the right variant, and multiplied the money, which after 5-6 years seems unreasonable, but the result is correct. I have not returned to this variant all these years, I have hardly found an Expert Advisor where this is done. By the time I found it, you had already written two posts :)))
And from a smartphone ;)
It's strange, of course. If I wrote stop value in pips, it is 300 (in his example). He multiplied it by _Point. As a result, at five-digit quotes the stop value in pips is 300*0.00001=0.003
Ok. If the difference between the necessary close price and the open price is equal to 0.003 (in the price), why did he multiply it and get 0.00000003 points? If he had divided it, he would have gotten 300 as he should.
In fact, I answered from my smartphone, without even realizing that I was answering you and not the original questioner ;)
And from a smartphone ;)
It's strange, of course. If I wrote stop value in pips, it is 300 (in his example). He multiplied it by _Point. As a result, at five-digit quotes the stop value in pips is 300*0.00001=0.003
Ok. If the difference between the necessary close price and the open price is equal to 0.003 (in the price), why did he multiply it and get 0.00000003 points? If he had divided it, he would have got 300 as it is supposed to be.
In fact, I was answering from my smartphone without even realizing that I was answering you and not the questioner at first ;)
And now I have already had dinner and I do not care what he gets. :)))
The main thing is that we understood each other... :)))))))))))))))))))
And now I've had my dinner and I don't care what he gets. :)))
The important thing is that you and I understand each other... :)))))))))))))))))))
Now I've had my dinner and I don't care what he gets. :)))
The main thing is that you and I understand each other... :)))))))))))))))))))
I think I've got it, gentlemen)))
double Test=100/(300*SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_VALUE));
That's how it works, thank you all)
I think I've got it, gentlemen))
double Test=100/(300*SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_VALUE));
That's how it works, thank you all)