Code for Extended limit orders (more than one bar)

Forums ProRealTime English forum ProOrder support Code for Extended limit orders (more than one bar)

  • This topic has 2 replies, 2 voices, and was last updated 5 years ago by avatarJan.
Viewing 3 posts - 1 through 3 (of 3 total)
  • #68225
    Jan

    Hi all,

    could not find the answer here around, that’s why I  made a new topic :

     

     

    The command BUY 3 shares AT Lowest[5](low) limit :  gives a limit buy order each time a bar close, defined as the minimum/lowest value of the last 5 closed bars;

    as long as the condition  close > close[1]  is true, the minimum value is recalculated after each bar close.

    Two questions:

    1. can the inital limit order be valid for more than one bar ? If yes, what is the PRT-code?
    2. can the initial minimal value be fixed in the code (not being recalculated after a bar) ?  If yes, how to code it in  PRT ? (with help of barindex – tradeindex or ??)

    Thanks in advance for your help !

    Kind regards, Jan

    #68227

    1 – No, pending Limit/Stop orders expire after one bar and need to be placed again and again as conditions are still met

    2 – You need to save that value and not let it be recalculated each new candle (but you will have to, sooner or later, recalculate it, maybe after some bars or at the beginning of a new day)

     

    1 user thanked author for this post.
    #75897
    Jan

    Using limit orders for more than one bar is also clearly described at the PRT  Trading programming Help manual,   https://www.prorealtime.com/en/pdf/probacktest.pdf   at page 11.

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