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

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #155533 quote
    BattyBatty
    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
    GraHalGraHal
    Participant
    Legend

    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
    BattyBatty
    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.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

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 BattyBatty
5 years, 9 months ago.

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