MqlTick.last is the price of the last deal from your broker (not your own deal). This price is only available when Depth of Market is enabled.
In a deal there is always a buyer AND a seller. If you are buying at ask, someone is selling at bid. If some is selling at bid, an other one is buying at ask. So each deal is done at some bid price, which is returned to mqltick.last (if available).
- www.mql5.com
Let me try to clarify some things:
1) FOREX market is completely different from stocks and futures markets;
2) If you're buying at ask, not necessarily someone is selling at bid... You could have, for instance, a very simple case where someone (person A) puts a buy limit order at a given price: so this person is not buying at ask, but simply putting an order at a given price, willing to wait for someone to sell at that price in the future. Another second person (person B), will actually sell at bid (at any given time in the future) and will in fact be responsible for the trade to occur.
3) What the original poster wrote is 100% correct for stocks and futures markets, however this is not true for FOREX market, and I'll try to explain why:
■ opposed to stock exchanges, Forex market is decentralized, i.e., you don't have an exchange where all trades occur and who, in fact, is responsible for all market data/information;
■ in stock exchanges, when you buy a stock (or a futures contract), you're actually buying directly from a second person/institution, and the broker will only charge you a fee for the trade;
■ in the Forex market, when you buy a given currency, you're actually buying indirectly this asset, i.e., you're actually buying the currency with a spread charged by your broker; in this case, the broker in fact goes to the market and purchases the currency, but sells it later to the client at a higher price, which is actually the way the broker gets its profit;
That's the reason why all trades occur at bid in Forex market.
- www.mql5.com
Let me try to clarify some things:
1) FOREX market is completely different from stocks and futures markets;
2) If you're buying at ask, not necessarily someone is selling at bid... You could have, for instance, a very simple case where someone (person A) puts a buy limit order at a given price: so this person is not buying at ask, but simply putting an order at a given price, willing to wait for someone to sell at that price in the future. Another second person (person B), will actually sell at bid (at any given time in the future) and will in fact be responsible for the trade to occur.
3) What the original poster wrote is 100% correct for stocks and futures markets, however this is not true for FOREX market, and I'll try to explain why:
■ opposed to stock exchanges, Forex market is decentralized, i.e., you don't have an exchange where all trades occur and who, in fact, is responsible for all market data/information;
■ in stock exchanges, when you buy a stock (or a futures contract), you're actually buying directly from a second person/institution, and the broker will only charge you a fee for the trade;
■ in the Forex market, when you buy a given currency, you're actually buying indirectly this asset, i.e., you're actually buying the currency with a spread charged by your broker; in this case, the broker in fact goes to the market and purchases the currency, but sells it later to the client at a higher price, which is actually the way the broker gets its profit;
That's the reason why all trades occur at bid in Forex market.
Let me try to clarify some things:
1) FOREX market is completely different from stocks and futures markets;
2) If you're buying at ask, not necessarily someone is selling at bid... You could have, for instance, a very simple case where someone (person A) puts a buy limit order at a given price: so this person is not buying at ask, but simply putting an order at a given price, willing to wait for someone to sell at that price in the future. Another second person (person B), will actually sell at bid (at any given time in the future) and will in fact be responsible for the trade to occur.
3) What the original poster wrote is 100% correct for stocks and futures markets, however this is not true for FOREX market, and I'll try to explain why:
■ opposed to stock exchanges, Forex market is decentralized, i.e., you don't have an exchange where all trades occur and who, in fact, is responsible for all market data/information;
■ in stock exchanges, when you buy a stock (or a futures contract), you're actually buying directly from a second person/institution, and the broker will only charge you a fee for the trade;
■ in the Forex market, when you buy a given currency, you're actually buying indirectly this asset, i.e., you're actually buying the currency with a spread charged by your broker; in this case, the broker in fact goes to the market and purchases the currency, but sells it later to the client at a higher price, which is actually the way the broker gets its profit;
That's the reason why all trades occur at bid in Forex market.
I was thinking a little bit more about:
"■ in the Forex market, when you buy a given currency, you're actually buying indirectly this asset, i.e., you're actually buying the currency with a spread charged by your broker; in this case, the broker in fact goes to the market and purchases the currency, but sells it later to the client at a higher price, which is actually the way the broker gets its profit;"
I can not figure where I am wrong in my below thinking:
So, because when I BUY the broker actually SELL to me; and that is why the BID price is registered. And because the BUY price>SELL price the broker make profit.
Now, let say I SELL. According to what you said above it should be like that: the broker actually BUY from me and than SELL to the market. If I am right, than the ASK price should be registered (the bold words give the registered prices in the two cases). More over; because BUY price>SELL price the broker lose.
I am sure I am wrong; so please explain what happens when I SELL.
I was thinking a little bit more about:
"■ in the Forex market, when you buy a given currency, you're actually buying indirectly this asset, i.e., you're actually buying the currency with a spread charged by your broker; in this case, the broker in fact goes to the market and purchases the currency, but sells it later to the client at a higher price, which is actually the way the broker gets its profit;"
I can not figure where I am wrong in my below thinking:
So, because when I BUY the broker actually SELL to me; and that is why the BID price is registered. And because the BUY price>SELL price the broker make profit.
Now, let say I SELL. According to what you said above it should be like that: the broker actually BUY from me and than SELL to the market. If I am right, than the ASK price should be registered (the bold words give the registered prices in the two cases). More over; because BUY price>SELL price the broker lose.
I am sure I am wrong; so please explain what happens when I SELL.
The spread is valid only for the customer, but not for the broker himself! Remember that the broker can always buy/sell at bid, so in the case you sell, the broker has two options: either sell the amount at the same price (bid price) in the market or sell this amount to another (internal) customer at the ask price, practicing the spread...
Put this in mind: the broker is like a bank, he never loses!
The spread is valid only for the customer, but not for the broker himself! Remember that the broker can always buy/sell at bid, so in the case you sell, the broker has two options: either sell the amount at the same price (bid price) in the market or sell this amount to another (internal) customer at the ask price, practicing the spread...
Put this in mind: the broker is like a bank, he never loses!
Well, now you lighted me a bit but also darkened. So if I BUY broker always win; if I SELL broker could win or could be even.
Please tell me if I understand right.
Now if I am right this rise another question, that could be or not, put in another thread: what is the behavior (how exactly process my order) an ECN, DD,NDD,STP,MTF etc.
And specific: What kind of broker is Alpari MT5 platform; from your opinion.
Well, now you lighted me a bit but also darkened. So if I BUY broker always win; if I SELL broker could win or could be even.
Please tell me if I understand right.
Now if I am right this rise another question, that could be or not, put in another thread: what is the behavior (how exactly process my order) an ECN, DD,NDD,STP,MTF etc.
And specific: What kind of broker is Alpari MT5 platform; from your opinion.
Discussions about brokers are forbidden in the community. Sorry.
Sorry, I do not want to break the rules, do not take into consideration the question about Alpari, but please answer the others.
Sorry, I do not want to break the rules, do not take into consideration the question about Alpari, but please answer the others.
There is a discussion about the types of brokers here. You could first take a look there.
Maybe you'll find something interesting. If not, please ask again in the forum. Anyway, I hope this might be useful.
Let me try to clarify some things:
1) FOREX market is completely different from stocks and futures markets;
2) If you're buying at ask, not necessarily someone is selling at bid... You could have, for instance, a very simple case where someone (person A) puts a buy limit order at a given price: so this person is not buying at ask, but simply putting an order at a given price, willing to wait for someone to sell at that price in the future. Another second person (person B), will actually sell at bid (at any given time in the future) and will in fact be responsible for the trade to occur.
3) What the original poster wrote is 100% correct for stocks and futures markets, however this is not true for FOREX market, and I'll try to explain why:
■ opposed to stock exchanges, Forex market is decentralized, i.e., you don't have an exchange where all trades occur and who, in fact, is responsible for all market data/information;
■ in stock exchanges, when you buy a stock (or a futures contract), you're actually buying directly from a second person/institution, and the broker will only charge you a fee for the trade;
Is it true in all case ? Can you explain why there is a Bid AND an Ask price for PETR4 for example, which is well a stock ?
■ in the Forex market, when you buy a given currency, you're actually buying indirectly this asset, i.e., you're actually buying the currency with a spread charged by your broker; in this case, the broker in fact goes to the market and purchases the currency, but sells it later to the client at a higher price, which is actually the way the broker gets its profit;
That's the reason why all trades occur at bid in Forex market.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I notice an strange behavior/display of the EA's log.
According to all documentations a SELL deal is done from BID price and a BUY deal from ASK price. But I notice that if I Print() the MqlTick() .last structure, what is printed/displayed is always the BID price doesn't matter if it was a SELL or BUY deal.
What is the explanation for this