New trading instructions: better management of your orders!

Forums ProRealTime English forum ProOrder support New trading instructions: better management of your orders!

Viewing 8 posts - 1 through 8 (of 8 total)
  • #190105

    Here is a new list of instructions specific to order management in automatic trading, which should greatly improve your programming.
    Largely inspired by the many support requests and remarks gleaned over the years on the forum, I’m sure you’ll appreciate these, so much they will simplify the setting of breakeven or the placement of stops for example.

    I’ve been testing them for a few weeks in beta and it works very well 🙂

    Here is the list:

    • ShortTriggered[N] / LongTriggered[N] : Allows to know if a Short / Long position has been opened on the candlestick N (optional N by default at 0)
      Useful to know when an order has been opened and its stop / profit has been triggered on the same candlestick, especially in the case of a WO position opening.
    • Set Stop Breakeven : Allows you to set a protective stop at the entry price of the current position, avoids the use of a closing WO.
    • Set Stop Price X : Allows to set a stop at a price X defined directly by the user and not in relation to the entry price of the position.
    • Set Stop pProfit/%Profit/$Profit/Profit X : Allows to set a stop at X points / % / € / unit above the entry price of the position.
    • Set target Breakeven : Allows to set a profit limit at the entry price of the current position, avoids the use of closing WO.
    • Set target Price X : Allows to set a profit limit at a price X defined directly by the user and not in relation to the entry price of the position.
    • Set target ploss/%loss/$loss/loss X : Allows to set a limit at X points / % / € / unit below the entry price of the position.

    (WO states for Working Orders, also known as “pending orders”)

    All these instructions are now available for any version of the platform, enjoy!

    Total of 16 users thanked author for this post. Here are last 10 listed.
    #190108

    ShortTriggered[N] / LongTriggered[N] examples: 

    Orders count, limit orders to X for today:

     

    1 user thanked author for this post.
    #192982

    All these new instructions have now been added in our online documentation for ProOrder/ProBacktest. Direct links for each of them are available in the above post.

    #192984

    Set Stop Breakeven example:

    Put my long order at breakeven (stoploss at entry price) if price is above the entry price (in profit) since 10 bars:

     

    #192986

    Set Stop Price example: 

    Stoploss at 5-bars lowest low at order launch:

     

    #193026

    Trailing stop profit example made with Set Stop Price:

    https://www.prorealcode.com/topic/trailing-profit-target/#post-192622

    1 user thanked author for this post.
    #193031

    I have a question about that. Would this feature replace all the trailing stopcodes that exist?

    #193032

    No, they do not replace them, these new instructions make things easier!

    For instance, no need to take care of continuously put a pending stop order at breakeven with a soft code version (countless codes about that in the forums!), just use the new SET STOP BREAKEVEN, and the server will take care of the rest when dealing with the broker.

    Same goes with SET TARGET or SET STOP at PRICE.

     

    1 user thanked author for this post.
Viewing 8 posts - 1 through 8 (of 8 total)

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