Buy immediately instead of bar next buy

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #234226 quote
    several
    Participant
    New

    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 quote
    GraHal
    Participant
    Master

    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.

    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.

    Multi timeframe – MTF indicators for ProRealTime

    Iván González, robertogozzi and inverse thanked this post
    #234345 quote
    Morpheous
    Participant
    New

    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)
  • You must be logged in to reply to this topic.

Buy immediately instead of bar next buy


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
several @several Participant
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by Morpheous
1 year, 7 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 06/22/2024
Status: Active
Attachments: No files
Logo Logo
Loading...