Can I get the current bid/ask spread into my code?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #155533 quote
    Batty
    Participant
    Junior

    Hi all,

    Is it possible to get the current spread, or the current bid / ask (buy / sell) prices to use in a system?  e.g. with Spot Gold, the spread varies  – usually between 0.3 and 0.5 but sometimes it is higher … 0.8 or more depending on volatility in the market. In March this year it went much higher.  So I’m trying to work out a function that will stop a system placing trades if the bid / ask spread is over a certain level. But I cannot see a way to get the spread or bid/ask prices into the system …. only “market price”.  Any thoughts on this will be much appreciated.

    #155535 quote
    GraHal
    Participant
    Master

    Can’t be done with accuracy outside of published spreads by IG.

    https://www.ig.com/uk/help-and-support/spread-betting-and-cfds/fees-and-charges/what-are-igs-indices-spread-bet-product-details

    Spread goes up in times of high volatility so the nearest you will get is to use volatility as a proxy / guessestimate for spread.

    Batty thanked this post
    #155543 quote
    Batty
    Participant
    Junior

    OK – thanks for the info GraHal, I’ll have a look at the volatility route

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Can I get the current bid/ask spread into my code?


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Batty @batty Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Batty
5 years, 1 month ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 12/29/2020
Status: Active
Attachments: No files
Logo Logo
Loading...