What does Copyspread function returns?

 

Hello, folks.

I'm kind of a newbie about Metatrader.

I've attached copyspread indicator from mql5 references(https://www.mql5.com/en/docs/series/copyspread) and got some result.

But my question is what does spread[x] = y actually mean? (Of course I know that spread = ask - bid).

As long as I know spread varies by time. so y is average spread of candle x period? or last spread?

And my another question is how many traders use bid and ask price for their trading strategy? I mean is it worthy to see both bid chart and ask chart for successful trading? (sth like using indicator on bid chart or find pattern on ask chart ... etc)

I'm using mt5.
Thanks.

Documentation on MQL5: Timeseries and Indicators Access / CopySpread
Documentation on MQL5: Timeseries and Indicators Access / CopySpread
  • www.mql5.com
CopySpread - Timeseries and Indicators Access - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
  1. I guess the spread data are provided by the broker (and not calculated in the terminal) so you can ask him.
  2. You buy at Ask and sell at Bid. So the smaller your profit target the more important is the spread.
 
Carl Schreiber #:
  1. I guess the spread data are provided by the broker (and not calculated in the terminal) so you can ask him.
  2. You buy at Ask and sell at Bid. So the smaller your profit target the more important is the spread.

Thanks for your reply.

I guess y is spread at the very last moment of candle x period.

 
gr84xMaster #:

Thanks for your reply.

I guess y is spread at the very last moment of candle x period.

Forum on trading, automated trading systems and testing trading strategies

Spread values of bars ?

Alain Verleyen, 2018.07.19 19:51

I monitored on M1 live bars and it's the minimum of the bar without any doubt, at least when I checked.

Apparently on higher timeframe, which on MT5 are build from M1 data, it's the maximum of M1 bars of the considered timeframe candle. Need to be confirmed.

I didn't check since that time, it's useless anyway.
 
Alain Verleyen #:
I didn't check since that time, it's useless anyway.
Thanks. Actually, I've searched about this quite a long time but couldn't find a right article. I'll comment to that article.
 

Forum on trading, automated trading systems and testing trading strategies

Experiences with MetaTrader 5 in "Opening"

Renat Fatkhullin , 2016.01.01 02:06

Most likely you are working on a broker server with an outdated version, where the spread within M1 bars was taken into account at the maximum value. In recent releases, we have changed the spread storage scheme to the minimum per minute, which is well suited for stock markets.

Our previous scheme for using the maximum minute spread in Forex was good, as it allowed us to implement the most pessimistic scenario during testing. Due to the huge liquidity of forex instruments and low spreads, everything was fine.

In the stock markets, everything turned out to be sadder and taking into account the maximum spread led to completely pessimistic scenarios. This has already been fixed and brokers just need to update - their historical databases will be automatically converted.

Your chart just shows that the transactions were carried out at huge spreads.

In any case, this problem will be solved in the next 2 months with the inclusion of real tick data in the tester. This data is already available in the terminals (do not forget to update) in full through the CopyTicks function.


Reason: