Cumulative orders – separate trailing stops

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #112605 quote
    tatie
    Participant
    Junior

    Hi all,

    I am building a trading code where I allow multiple orders in the same direction – which means I could have up to 4 long trades on the same strategy running simultaneously.

    My code has a trailing stop which moves the initial stop loss to break even when it reaches a 1:1 risk/reward. However, I am having an issue with this, because I would like each stop loss (for each of the 4 trades) to move independently.

    My current code has an error, which I do not know how to correct: the stop loss for the 4 trades move to the same level at the same time. So my question is: is there a way to move the stops independently for each of the 4 trades?

    Is there a way to “name” or recognise each trade within the code separately?

    Thanks!

    #112606 quote
    Nicolas
    Keymaster
    Master

    There is no way to recognize order, since all orders are considered as a whole one with an average open price level.

    So in order to set different stoploss the way you want, the best way to do is by making partial closure of this global order, as described in this blog post: Partial closure of positions when price is retracing – A complete function

    Please note that at the moment, the partial closure of position is still not possible in live trading and I don’t have any ETA.

    #112607 quote
    tatie
    Participant
    Junior

    In MT4 there is something called “magic number” to identify each trade.

    Would you know if PRT is adding something like that to the new PRT version that will shortly be released or to a future version?

    #112610 quote
    Nicolas
    Keymaster
    Master

    Not magic number but order ticket 🙂 Magic number is used to identify orders from a specific strategy.

    I don’t think that it will be shortly added, it involves a lot of modification.

    #141165 quote
    UkDownUnder
    Participant
    Average

    Hi, I’m trying to running a strategy that needs to be able to place trades in a smaller tf to the main strategy in the opposite direction while the larger tf orders remain open. On MT4 this would be possible with the use of a system identification number, ie a magic number. I have tried reversing my code and running a separate ProOrder with the reversed strategy on the same instrument, however the first strategy on the same instrument over rides this inverted strategy, also played around with the force open setting, which makes not difference.

    I guess it would be possible to run on $5 lots to appose the $1 mini lots, however this is not possible for most accounts while learning the craft. Will it be possible for PRT to enable Micro lots for Australian clients and to enable force open on Automatic trading, Regards.

    #141486 quote
    Vonasi
    Moderator
    Master

    It is not possible to be both long and short at the same in a PRT strategy. Any opposite order closes any open trades in the opposite direction.

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

Cumulative orders – separate trailing stops


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
tatie @tatielek Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 11/12/2019
Status: Active
Attachments: No files
Logo Logo
Loading...