Indicators: SpreadInfo



SpreadInfo displays current spread, its average value and their ratio in one of the chart corners. Font type, color and size can be customized in the input parameters.

СMoving_Average class of the SmoothAlgorithms.mqh library is used for the indicator compilation.

Author: Nikolay Kositsin


Alain Verleyen
Alain Verleyen  

This indicator doesn't work as expected,  it doesn't display the updated spread of each tick.

Spread shown on the chart is the spread registered with candle data, it corresponds to the max spread for the current candle. So the moving average is the average of the max spread of each candle, which can be very different from current spread on some brokers.

Sergey Golubev
Sergey Golubev  

Forum on trading, automated trading systems and testing trading strategies

Indicators: spread_on_chart

newdigital, 2014.01.12 08:59

What Does a Spread Tell Traders?

  • Spreads are based off the Buy and Sell price of a currency pair.
  • Costs are based off of spreads and lot size.
  • Spreads are variable and should be referenced from your trading software.

Spreads and Forex

Every market has a spread and so does Forex. A spread is simply defined as the price difference between where a trader may purchase or sell an underlying asset. Traders that are familiar with equities will synonymously call this the Bid: Ask spread.

Below we can see an example of the spread being calculated for the EURUSD. First we will find the buy price at 1.35640 and then subtract the sell price of 1.32626. What we are left with after this process is a reading of .00014. Traders should remember that the pip value is then identified on the EURUSD as the 4th digit after the decimal, making the final spread calculated as 1.4 pips.

Now we know how to calculate the spread in pips, let’s look at the actual cost incurred by traders.

Spreads Costs and Calculations

Since the spread is just a number, we now need to know how to relate the spread into Dollars and Cents. The good news is if you can find the spread, finding this figure is very mathematically straight forward once you have identified pip cost and the number of lots you are trading.

Using the quotes above, we know we can currently buy the EURUSD at 1.3564 and close the transaction at a sell price of 1.35474.That means as soon as our trade is open, a trader would incur 1.4 pips of spread. To find the total cost, we will now need to multiply this value by pip cost while considering the total amount of lots traded. When trading a 10k EURUSD lot with a $1 pip cost, you would incur a total cost of $1.40 on this transaction.

Remember, pip cost is exponential. This means you will need to multiply this value based off of the number of lots you are trading. As the size of your positions increase, so will the cost incurred from the spread.

Changes in the Spread

It is important to remember that spreads are variable meaning they will not always remain the same and will change sporadically. These changes are based off of liquidity, which may differ based off of market conditions and upcoming economic data. To reference current spread rates, always reference your trading platform.

Sergey Golubev
Sergey Golubev  

Forum on trading, automated trading systems and testing trading strategies

Scripts: News VLine

newdigital, 2014.01.30 09:25

Forex Spreads and the News (based on dailyfx article)

  • Spreads are based off the Buy and Sell price of a currency pair.
  • Spreads are variable and can change during news.
  • Watch for normalization of spreads, shortly after economic events.

Financial markets have the ability to be drastically effected by economic news releases. News events occur throughout the trading week, as denoted by the economic calendar, and may increase market volatility as well as increase the spreads you see on your favorite currency pairs.

It is imperative that new traders become familiar with what can happen during these events. So to better prepare you for upcoming news, we are going to review what happens to Forex spreads during volatile markets.

Spreads and the News

News is a notorious time of market uncertainty. These releases on the economic calendar happen sporadically and depending if expectations are met or not, can cause prices to fluctuate rapidly. Just like retail traders, large liquidity providers do not know the outcome of news events prior to their release! Because of this, they look to offset some of their risk by widening spreads.

Above is an example of spreads during the January NFP employment number release. Notice how spreads on the Major Forex pairs widened. Even though this was a temporary event, until the market normalizes traders will have to endure wider costs of trading.

Dealing with the Spread

It is important to remember that spreads are variable, meaning they will not always remain the same and will change as liquidity providers change their pricing. Above we can see how quickly spreads normalize after the news. In 5 minutes, the spreads on the EURUSD moved from 6.4 pips back to 1.4 pips. So where does that leave traders wanting to execute orders around the news?

Traders should always consider the risk of trading volatile markets. One of the options for trading news events is to immediately execute orders at market in hopes that the market volatility covers the increased spread cost. Or, traders can wait for markets to normalize and then take advantage of added liquidity once market activity subsides.

Sergey Golubev
Sergey Golubev  

Spreads Can Cause Margin Calls (based on dailyfx article)

At this point in our trading education, we should be aware of the fact that FX spreads are variable and can widen to levels several times larger than their typical spreads. These spread increases are most often seen during news releases and can affect our positions rapidly. But, what is the best way to weather the storm during times of widening spreads?

How to Truly Protect Ourselves Against Widening Spreads

The only way to protect ourselves during times of widening spreads is to restrict the amount of leverage used in our account (which in my opinion, should be less than 10x leverage). Spreads can only hurt us when a trade is being opened or closed. If we aren’t opening or closing a trade during a news events, we won’t be affected. Prices will eventually go back to normal and at some point we will close on our own terms.

The only time the market can force our hand to liquidate our positions is with a margin call. If we reduce our leverage, we reduce our chances of liquidation.

The “Hedging” Myth

Helping traders around the world means that I have seen many different methods to trade this market, both good and bad. One of the most damaging methods I’ve come across is the idea of ‘hedging’ a Forex trade by opening an opposing trade in the same currency pair and holding both long and short positions simultaneously. This not only incurs greater trade cost (by paying additional spread) but does not protect your position against additional losses.
Hedgers attempt to lock-in their profit or loss on a trade by opening an opposing trade, but if the spread widens, this negatively affects both sides of the trade. If the trader is over leveraged on these trades, a wider spread could incur a margin call and liquidate both positions. Worst of all, you would most likely be filled at the widened spread prices, adding insult to injury.
So now we know, hedging is not the proper way to secure a profit or a loss. Only the closing of a position can do that. Hedging also can be dangerous around widening spreads and can cause margin calls, so we need to limit the amount of leverage we are using to 10x or less.