Initial stop loss and a profit target for two separate setups doesn’t work

Forums ProRealTime English forum ProOrder support Initial stop loss and a profit target for two separate setups doesn’t work

Viewing 4 posts - 1 through 4 (of 4 total)
  • #167198

    Hi,

    How can I code two separate setups, one with only an initial stop loss  and the other with an initial stop loss and a profit target.

    When I create the code like below what happens is that Setup 1 which has only an initial stop loss (and some other exit rules that are not below), exits with the profit target that I defined for Setup 2. It seems like once a profit target is defined it is applied to any open trade. Why is that?

    Can I code it in a way that the profit target is only applied for the trade setup 2?

    Thanks

    Sascha

     

    #167230

    There is no way to identify the orders with code. What you can do is partial closing of position in profit at a desired level with a pending order, example  below:

     

    #167268

    Thanks for your reply.

    That’s unfortunate that this is not working. The goal was that I wanted to have one setup once triggered lets the trade run as long as possible until stopped out with a predefined trailing stop loss. And a second setup that exits with a fixed profit target, and having both setups in one automated trading system.

    However, it seems that the solution is only to have two separate trading systems. One with a trailing stop loss and the other with a fixed profit target. The annoying thing is that if I want to run this system on 8 currency pairs, then I have to have 16 systems instead.

    I mentioned before that I had the impression that once a profit target is defined (like it is Setup 2 in the example code) it is applied to any open trade. How is that technically possible?

    If only the conditions for Setup 1 are me (which has no profit target) and the conditions for Setup 2 are not met, how can the profit target be even triggered as it is only within the if-clause of Setup 2?

    #167307

    Because the Takeprofit is applied directly to any open order, there is no way to select an order specifically.

Viewing 4 posts - 1 through 4 (of 4 total)

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