Buy immediately instead of bar next buy

Forums ProRealTime English forum ProOrder support Buy immediately instead of bar next buy

Viewing 3 posts - 1 through 3 (of 3 total)
  • #234226

    Hey, just looking at the assisted tool. There’s only an option for buy @ ‘next bar open’ or ‘next day open’. Is there not at option for buying when the conditions are met? ie, if price of current candle is greater than close of previous candle, I want to buy as soon as it’s trigger, not wait for the open of the next candle.

    If this option isn’t available in the assisted creation tool, is it available in code?

    #234227

    Code is read at the end of each candle on whatever timeframe you are running the code at. So 5 min TF, the code is read every 5 mins at the end of the candle / bar.

    The Open or Close trade is then executed at the open of the next candle / bar (a few milliseconds after the close of the previous candle / bar).

    Only way you can execute a trade (open or close) during a bar, is to set a Pending Order to execute when, for example, a price level is met that satisfies the Pending Order.

    https://www.prorealcode.com/documentation/stop-pending/

    The nearest you can get to what you want – without using Pending Orders – is to run your code on multi-timeframe.

    Multi-TF means, for example, using a 5 min TF and when conditions are met within a 5 min bar then the trade could be executed on, for example, a 1 second or 5 second candle / bar.

    https://www.prorealcode.com/topic/multi-timeframe-mtf-indicators-for-prorealtime/

     

    3 users thanked author for this post.
    #234345

    Pending orders should the the way to go I think, the conditions are likely to be known at the end of each bar

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

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