It is not possible to know the current amount of spread. You can code a strategy to not trade at times when spread is known to be large such as when a market is closed or you can allow for fixed levels of spread at different times of the day to be considered in your code but you cannot know if for example spread has suddenly widened due to high volatility.
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue