How to trigger trades during a bar without waiting for the bar closure?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #147990 quote
    Oliviertrader2020
    Participant
    Average

    Hello,

    I have an important question.
    With ProOrder, trades are triggered when a new candle opens.

    Is it possible to take a trade without waiting for the candle to close?

    For my robots I would like to take trades:
    – As soon as the price breaks the highest of the previous candle.
    – As soon as the price rebounds on an SMA20.

    #147991 quote
    Nicolas
    Keymaster
    Master
    #147992 quote
    Nicolas
    Keymaster
    Master

    Simple example to use a pending order on a dynamic price level (SMA20):

    timeframe(15 minutes) //timeframe of the moving average, change with your desired timeframe
    avg = average[20](close)
    
    timeframe(10 seconds) //10 seconds or whatever timeframe/time period you want the pending order to be updated 
    if not longonmarket and close>avg then //not on market and price is above the SMA20
     buy 1 contract at avg limit //put a pending order on average 20
    endif  
    
    

    Every 10 seconds, a pending limit order will be set at the exact price of the 15-minutes TF SMA20.

    #177946 quote
    Amr600
    Participant
    New

    Hello i tried to do so but it keeps giving me this error:

     

    can u help me out?

     

    thanks 600

    error-1.png error-1.png
    #177953 quote
    robertogozzi
    Moderator
    Master

    @Amr600

    do not double post!

    AND

    do not append your questions to exixting unrelated topics. Start a new one, instead.

    Thank you 🙂

    You question has already been addressed.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

How to trigger trades during a bar without waiting for the bar closure?


ProOrder: Automated Strategies & Backtesting

New Reply
Summary

This topic contains 4 replies,
has 4 voices, and was last updated by robertogozzi
4 years, 5 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 10/21/2020
Status: Active
Attachments: 1 files
Logo Logo
Loading...