A trade when mid price reached

Forums ProRealTime English forum ProRealTime platform support A trade when mid price reached

Viewing 5 posts - 1 through 5 (of 5 total)
  • #55437

    Hi, 

    I was wondering if it was possible to have an order that only executes at market price only when it is the mid that hits the price required and not either the bid or the ask?

    Thanks in advance.

    #55495

    Are you talking about ProOrder (automatic trading) orders?

    #55529

    Hi Sigfried,

    the problem with that idea is the existence of a spread. You will never get that middle price. If spread=1 and you want your market price to be 10 when the middle price is 10 then 9,5 is the order level for you.  Really not sure if that’s what you want, but possible. The shorter your timeframe the less likely will your order be filled. Accounting for different spreads during the day is possible and code snippets are easy to do (or can be found in the forum and the library).

    If it helps your analysis you can also create a price indicator that substracts (or adds) the current spread from the actual price.

    Either way, the spread can change due to unexpected above average volatility. I don’t know of any way to retrieve the current spread from your broker direct.

    Hope this helps.

    #88618

    Does any code exist in ProRealcode to call the bid and ask prices?

    The issue I am having is when using a Parabolic SAR type indicator for my strategy which flips over when the trend changes, my chart (and SAR) are showing AND reading from the mid price from IG index but the trades are being triggered by the bid and ask.

    The two are not in alignment and can have potentially catastrohic results.

    My code is using high and low, but it needs to get high of ask and low of bid

    In the shot below the actual account when short but he strategy did not, this is due to the above.

    Any solutions out there?

    #89023

    @Precision there’s no code that can request the bid/ask price.


    @Derek
    Re: “If it helps your analysis you can also create a price indicator that substracts (or adds) the current spread from the actual price.” I’m guessing you actually didn’t mean the “current spread” because like you stated we can’t get that information live through PRT. I guess you meant that you can estimate the bid/ask based on mid priced displayed on PRT based on the average suggested spread from IG.

Viewing 5 posts - 1 through 5 (of 5 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login