The "opening" spread vs The "closing" spread - page 2

 
Mpendulo Chiliza: use the OrderCommission() function after OrderSelect()

Commission has nothing to do with Spread. They are two totally distinct types of trading costs!

 
Is there any benefit if I open a position when spread is high and close a position when spread is low?
 
novi:
Is there any benefit if I open a position when spread is high and close a position when spread is low?

No

 
  1. Randy: Will my profit be +0.12 - the opening spread or the closing spread?
    You buy at the Ask and sell at the Bid. So for buy orders you pay the spread on open. For sell orders you pay the spread on close.
    1. Your buy order's TP/SL are triggered when the Bid reaches it. Not the Ask.
    2. Your sell order's TP/SL will be triggered when the Ask reaches it. To trigger at a specific Bid price, add the average spread.
                MODE_SPREAD (Paul) - MQL4 and MetaTrader 4 - MQL4 programming forum - Page 3
    3. The charts show Bid prices only. Turn on the Ask line to see how big the spread is (Tools -> Options {control-O} -> charts -> Show ask line.)

  2. novi: Is there any benefit if I open a position when spread is high and close a position when spread is low?
    If you sold, the spread on open is irrelevant.
 
William Roeder:
  1. You buy at the Ask and sell at the Bid. So for buy orders you pay the spread on open. For sell orders you pay the spread on close.
    1. Your buy order's TP/SL are triggered when the Bid reaches it. Not the Ask.
    2. Your sell order's TP/SL will be triggered when the Ask reaches it. To trigger at a specific Bid price, add the average spread.
                MODE_SPREAD (Paul) - MQL4 and MetaTrader 4 - MQL4 programming forum - Page 3
    3. The charts show Bid prices only. Turn on the Ask line to see how big the spread is (Tools -> Options {control-O} -> charts -> Show ask line.)

  2. If you sold, the spread on open is irrelevant.

Hi, @William Roeder  @Keith Watford

I fully understood the concept of you buy/sell at bid/ask depending on the position. However the MT5  and MT5  tester makes it confusing on what system do they follow.

Ideally (Enter Long):

Entry Price = 5.00000

Bid = 4.99999

Ask = 5.00001 -- use this because of Long position

Spread = 0.2 pips

------------------

Exit Price = 5.50000

Bid = 5.49998 --use for exit

Ask  = 5.50002 

Spread = 0.4 pips


Ideal: (Charges half of full spread at Entry and Exit)

Ideally we use bid and ask prices. so the actual spread is halved at entry and exit. 0.1 pips at entry, 0.2 when exiting


Experience in MT5 Terminal: (Charges full spread at Entry)

But in my experience in mt5, it only charges me FULLY at entry. When I exited, the profit is as I computed as if the spread was at entry. Whether or not the spread widens at exit does not matter (or maybe im wrong).


Experience in the MT5 Tester: (Charges full spread at Entry and Exit)

In MT5 tester, as I was checking it on Excel with downloaded bars. I confirmed that the Tester charge me a spread at Entry and another at Exit. I notice its not the half spread (in which case, it would make sense), but the full spread.


What do you make of this?


This is the link of the issue when I exited a price and it goes overwhelmingly beyond the high/low of the bar. Culprit is the spread at exit when examined at Excel downloaded bars. For reference.

https://www.mql5.com/en/forum/327793#comment_14142298

Wrong Exit Price on MT5 Tester
Wrong Exit Price on MT5 Tester
  • 2019.12.05
  • www.mql5.com
I have this situation where I exit on a bar that even exceeds its high/low on the tester. (See picture for reference). M5 Timeframe...
 
Randy:


So Zap (or anyone), I guess my question is, am I only charged the spread when I enter the market?

Or am I charged both when I enter, AND/OR when I exit?

You buy at the Ask and sell at the Bid. So for buy orders you pay the spread on open. For sell orders you pay the spread on close.
  1. Your buy order's TP/SL (or Sell Stop's/Sell Limit's entry) are triggered when the Bid reaches it. Not the Ask. Your SL is shorter by the spread and your TP is longer. Don't you want the same/specified amount for either direction?
  2. Your sell order's TP/SL (or Buy Stop's/Buy Limit's entry) will be triggered when the Ask reaches it. To trigger at a specific Bid price, add the average spread.
              MODE_SPREAD (Paul) - MQL4 programming forum - Page 3 #25
  3. The charts show Bid prices only. Turn on the Ask line to see how big the spread is (Tools → Options (Control-O) → charts → Show ask line.)
 
William Roeder:
You buy at the Ask and sell at the Bid. So for buy orders you pay the spread on open. For sell orders you pay the spread on close.
  1. Your buy order's TP/SL (or Sell Stop's/Sell Limit's entry) are triggered when the Bid reaches it. Not the Ask. Your SL is shorter by the spread and your TP is longer. Don't you want the same/specified amount for either direction?
  2. Your sell order's TP/SL (or Buy Stop's/Buy Limit's entry) will be triggered when the Ask reaches it. To trigger at a specific Bid price, add the average spread.
              MODE_SPREAD (Paul) - MQL4 programming forum - Page 3 #25
  3. The charts show Bid prices only. Turn on the Ask line to see how big the spread is (Tools → Options (Control-O) → charts → Show ask line.)

You buy at the Ask and sell at the Bid.So for buy orders you pay the spread on open. For sell orders you pay the spread on close.

Im sorry That's slightly confusing for me. Buying at Ask (assuming entry) and selling the Bid (assuming exiting) is not the same as paying Spread for when entering and exiting, at least for me.


Let's say Spread is 2 pips at both entry price and exit price. Ignoring the movement of price:

1. Buying/entry Ask (1 pips) and selling/exiting Bid (1 pips) total of 2 pips. If the price is 5.0000, you're buying at Ask = 5.0001 (1 pip); exiting at Bid = 4.9999 (1 pip). total of 2 pips lost

2. While saying that paying spread on open (2 pips) and exiting (2 pips) is total of 4 pips.


should it be like this? 

You buy at the Ask and sell at the Bid. So for buy orders you pay the HALF spread on open. For sell orders you pay the  HALF spread on close.

 

I think that it is about time that this is cleared up.

In MT4 the spread is paid when the trade is opened whether it is a buy or a sell.

When you open a buy, look in the terminal and you will see that the trade was opened at Ask, but the current price of the trade is the Bid.

The OrderClose() price is Bid.

When you open a sell, look in the terminal and you will see that the trade was opened at Bid, but the current price of the trade is the Ask.

The OrderClose() price is Ask.

Does that make sense?

 
franzzzz:

should it be like this? 

You buy at the Ask and sell at the Bid. So for buy orders you pay the HALF spread on open. For sell orders you pay the  HALF spread on close.

This is how it will be on other platforms where the chart shows mid price

 
Keith Watford:

This is how it will be on other platforms where the chart shows mid price

No. Whatever how the chart is built, the mechanism you described in your previous post  is always right. Using mid prices, bid prices or any other price to show on the chart, is totally independent of how the spread take part to a trade.

I think that it is about time that this is cleared up.

People using a "mid price" platform think the bid is midprice-1/2 spread  and ask is midprice+1/2 spread (and so it's "paid" half at the open, half at he close) because they don't understand that this midprice is only an abstraction.

People using a "bid price" platform, like MT4 and MT5, think the ask price is bid price+spread, as if the spread was something existing by itself. It's not, the spread is the difference between the 2 real prices which are bid and ask. All of this is obscured by things like fixed spread offered by some market maker brokers or other spread manipulations. But we are talking here about the essence of a Forex market. The bid price is the best price offered by buyers at which you can sell, the ask price is the best price offered by sellers at which you can buy. That's the only 2 realities on a Forex market.

Beside that, using the word "pay" as in "the spread is paid at open" (or at close or in the middle of a trade, doesn't matter here) is misleading and confusing. The spread is not something paid in the usual sense, as I explained above it's the difference between bid and ask price and it influences directly your trade (It's completely different from paying a commission for example). Let's take a buy open at 1.1002 (ask), bid price is 1.1000 at that time, so the spread is 2 pips. You want to realize 5 pips profit so close at 1.1007, the price has to move 7 pips. Now, imagine the same trade but on an other broker you buy at 1.1002 (ask) but the bid price is 1.1001 for a spread of 1 pip. You still want to realize 5 pips profit, so close at 1.1007. The price has to move only by 6 pips this time. It's not that you "pay" 1 pip instead of 2 pips, it changes your trade because in the first case if the market moves only for 6 pips your trade will not reached 1.1007 and could eventually never reached it.

You are totally right saying the spread is taken into account at the opening, once a buy trade is open the only price which matters is the bid price because when you will want to close your trade you will need to sell, find a buyer and so the best bid price. Once a sell trade is open the only price which matters is the ask price because when you will want to close your trade you will need to buy, find a seller and so the best ask price.

Reason: