Calculating the spread on a position, SP500

 
I hope you are all well,

can someone explain to me why I have 0.48 in gains, it's as if the spread wasn't included in the calculation?

I created a $100.00 demo account and thanks to this trade it is positive at $100.48



I've added a graph with lines for input and output values


would the logical calculation be: 4285.47 - 4281.00 = 4.47 x 0.1 Lot = 0.45$ ?

Best Reguards,
ZeroCafeine

 
ZeroCafeine: can someone explain to me why I have 0.48 in gains, it's as if the spread wasn't included in the calculation? I created a $100.00 demo account and thanks to this trade it is positive at $100.48. I've added a graph with lines for input and output values. would the logical calculation be: 4285.47 - 4281.00 = 4.47 x 0.1 Lot = 0.45$ ?

Spread is NEVER included in the calculation because it was already contemplated in the opening and closing prices for the position. A buy opens at the Ask and closes at the Bid price.

The position opened at 4280.93 and closed at 4285.68. That is a price change of 4.75 (475 points). Assuming a point value of 0.01 and with a volume of at 0.1 lots, that is $0.475, which got rounded off to $0.48

 
ZeroCafeine: would the logical calculation be: 4285.47 - 4281.00 = 4.47 x 0.1 Lot = 0.45$ ?

No, you have ignored the slippage. Those may have been your intended target prices for the open and stop, but due to slippage the actual prices were 4280.93 (open) and 4285.68 (close)

EDIT: You had positive slippage at both the position open and the close.

 
Fernando Carreiro #:

No, you have ignored the slippage. Those may have been your intended target prices for the open and stop, but due to slippage the actual prices were 4280.93 (open) and 4285.68 (close)

EDIT: You had positive slippage at both the position open and the close.

Thank you very much for your reply. As far as the entry is concerned, it's a limit entry, so logically there's no slippage, but there is a spread,

As for the exit, yes indeed it's a stop loss, so it's a market order and you need to have slippage, but for the entry it was a limit entry,

I did a test this afternoon and recorded the video at the moment of entry. I'll watch it tomorrow if I have time, and do some more tests to be sure it's working,

even if theoretically it makes so much sense to me, but I'd rather be in the know if I want to master my trading,

Thanks again Fernando 😉

 
ZeroCafeine #: Thank you very much for your reply. As far as the entry is concerned, it's a limit entry, so logically there's no slippage, but there is a spread.

That was clearly not the case. One can clearly see from your deals information that there was positive slippage.

Your buy limit was for 4281.00, but the "in" deal was at 4280.93. That is an 8 point positive slippage.


When looking at your trade data, always look at actual deal prices, not your expected order prices.

You don't even need to look at any further than the data you have already shown here on this forum topic.

Look at your order prices, and look at your "in" and "out" deal prices.

Nothing more needs to be said. Spread had nothing to do with it.

  • A buy opens at the Ask price and closes at the Bid price.
  • A sell opens at the Bid price and closes at the Ask price.

The spread is already "baked in". There are no further spread costs.

EDIT:

  • A "Buy Limit" is triggered when the Ask price is equal to or lower than the order's trigger price.
  • A "Sell Limit" is triggered when the Bid price is equal to or higher than the order's trigger price.

EDIT2:

  • A "Buy Stop" is triggered when the Ask price is equal to or higher than the order's trigger price.
  • A "Sell Stop" is triggered when the Bid price is equal to or lower than the order's trigger price.
 

@Fernando Carreiro

Thank you for your answer. It's not clear, But it's very clear 😉, 

I tried looking in the documentation but it was a bit complicated for me, so I tried to make my own understanding for the Deals and that's where the error comes from.

Even if the word Deal is very clear

I also understand better the positive slippage of my entry that I had not taken into account in my calculations.


I've displayed the Bid and Ask prices on the chart, and I see that it's the Bid price that's drawing the candle, can you confirm this?



Also in the case of a long market trade, If I want to exit the market with a Sell stop (Stop Loss) at 4200 for example (which is for example the last low on the chart), if I understand correctly when the highest Bid price is equal to 4200 then I will exit the market with a market order, If it's not clear, I'll try to draw a little photo.

Fernando Carreiro
Fernando Carreiro
  • 2023.10.01
  • www.mql5.com
Trader's profile
 
ZeroCafeine #: I've displayed the Bid and Ask prices on the chart, and I see that it's the Bid price that's drawing the candle, can you confirm this?

Yes, charts are displayed using only "Bid Prices" or only "Last Prices" depending on the type of symbol.

Open up the symbol's specifications and it tells you which method is used ...


 
ZeroCafeine #: Also in the case of a long market trade, If I want to exit the market with a Sell stop (Stop Loss) at 4200 for example (which is for example the last low on the chart), if I understand correctly when the highest Bid price is equal to 4200 then I will exit the market with a market order, If it's not clear, I'll try to draw a little photo.

Exiting a Buy/Long position, will take place at the Bid price.

So when a stop-loss is applied to a Buy/Long position, then it will trigger an exit when the Bid price touches or goes below the specified stop-loss trigger price.

For your example of s stop-loss set at 4200, then it will trigger when the Bid price touches 4200 or goes below that. However the actual exit price will depend on the available liquidity (and processing delays), which means that it can suffer slippage.

 

Tks you so much Fernando,

here's a little diagram I drew for my own understanding and which I'm sharing so that it can help other people,

Bid ask

In this case is an Buy Long Limit order ar 32, So I can be executed at 32 or better, like in the case 2 I have a positive slippage