Features of the mql5 language, subtleties and tricks - page 25
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
If you're not used to it, you can write it this way
and in the OrderSend() function send a variable contract regardless of the whim of the DC.You may have written that there is also a 10k contract. If they will have cent accounts on MT5, they may be even 1000. I want it to be universal through standard MQL5 variables.
This is the universal formula for translating into familiar lots. All normal ones have a standard lot equal to 100,000 and have always counted a lot from it. Lot 0.1 = 10000 units of base currency.
If SymbolInfoDouble(_Symbol, SYMBOL_TRADE_CONTRACT_SIZE) == 10000, we get 100000/10000 (this would be 10), and multiplying by lot 0.1 we get 1, that is 10000 base currency units.
This is the universal formula for translating into familiar lots. All normal ones have a standard lot equal to 100,000 and have always counted a lot from it. Lot 0.1 = 10000 units of base currency.
If SymbolInfoDouble(_Symbol, SYMBOL_TRADE_CONTRACT_SIZE) == 10000 then it means 100000/10000 (this will be 10) and multiplying by 0.1 lot we get 1, that is 10000 base currency units.
I am more interested in the pip value. When I was working with 4, I don't remember it ever being different for standard and cent accounts (when the contract size was different). I hope it's just one Just2Trade only so different. But now I will have to always check this property on new brokers or new account types.
Well, the point value mql counts for 1 standard lot set by the broker(DC). It is the size of the standard lot set by the broker and you need to know before you start trading. At one time it was the standard, everyone had 100000, but times have changed.
As for standard and cent accounts, that's where the difference is set on the DC's server, and it doesn't change in MT in any way. Although everything can be, but I have not met any perverts.
Well, the point value mql counts for 1 standard lot set by the broker(DC). It is the size of the standard lot set by the broker and you need to know before you start trading. It used to be a standard, ALL had 100000, but times have changed.
As for the standard and cent accounts, the difference is set on the server DC, and in MT it does not change. This is the difference between these two types of accounts.
There are micro accounts, where the contract size is 100 times less, with the same volume
Please tell me how to get the data from the left part of the Depth of Market, where each trade is displayed. The MarketBookGet() function gets data from the right part of the Depth of Market, where the volumes are aggregated.
Please tell me how to get the data from the left part of the Depth of Market, where each trade is displayed. The MarketBookGet() function receives data from the right part of the Depth of Market, where the volumes are aggregated.
https://www.mql5.com/ru/docs/series/copyticks
Forum on trading, automated trading systems and trading strategies testing
MetaEditor build 1470
fxsaber, 2016.11.12 15:05
A handy feature for Hedge accounts.
PositionSelect generates information on the net position.
The PositionGetInteger(POSITION_TICKET) returns the ticket of the first position opened, which finally formed the net position direction (PositionGetInteger(POSITION_TYPE)).
The TP and SL will correspond to the last position in time of opening, which coincides with the net position direction.