Setting the Basket/Combined Profit Target

Forums ProRealTime English forum ProOrder support Setting the Basket/Combined Profit Target

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

    On IG PRT currently the:

    is set for each individual position that is opened within a system and not as a basket/combined positions.

    A potential solution for this as suggested by Nicolas (here) is:

    When I had tried this it didn’t work. When I start a strategy it get’s “Rejected”. It’s opens but shortly after it get’s closed with the response from PRT being:

    The limit level you have requested is too far from the current market level. The maximum limit distance from the current market level for this market is 9973.350 per point

    The IG Markets transaction list showed the positioned opened at 1.32965 – in summary it didn’t work so I tried:

    This seemed to work but still each position was set to hit profit target of 10 pip/point of profit each at a combined level to make it 20pip/point. Then 1 more attempt:

    This seems to work – hope it’s helpful for others and feel free to make suggestions or improvements.

    #48391

    Thanks David, but while $PROFIT is a target in the money account, the solution you propose is set to exit on points basis.

    Also, even with IG, POSITIONPRICE is the whole basket average price of all opened orders on market.

    The limit level you have requested is too far from the current market level. The maximum limit distance from the current market level for this market is 9973.350 per point

    I must admit that I’m totally lost about this error … still trying to understand where the first code is failing.. ?! Are you on a limited risk account?

    #48393

    Nicolas I guess you’re pointing out that I’m mixing the concept of $PROFIT with PointProfit but at this stage there is no way to set PointProfit and this means when some uses this approach they have to be aware of this and take this in consideration on the instrument they trade and size etc…?

    So If you trade EURUSD set it to: SELL AT positionprice+((0.001*pointvalue)/COUNTOFPOSITION) LIMIT 
    mini = USD $10
    standard = USD $100

    What would be another way to make this work to set an actual SET TARGET $PROFIT BASKET?

    I’m not on a limited risk live account (but I did this on a demo which might be limited risk?), regardless I don’t think it is related in this example because how it came up with “9973.350”, and the Order List showed 2.32711 while the actual open price was 1.32965

    #48396

    oh! got it now.. it wasn’t clear to me what you were looking to do at the first glance. Your solution is a good one, another one would be to calculate the basket floating profit and take decision from it:

     

    #48397

    I have used the floatingprofit but the downside with that approach is that we have to wait for the Bar to Close which is dependent on timeframe to check that the profit target is met and sadly sometimes an opportunity to take profit is missed especially when higher volatility shows because the price moves away by the time the Close happens also floatingprofit  can be a slight issue with spread because PRT cannot account for it. Thanks for the suggestion.

    #62873

    I’ve been doing some testing with this code block.

     OPTION 1
     This will only set the Sell Limit after 1 bar of the trade starting with no Sell Limit set until the 2nd bar

    OPTION 2
    This will set the SELL LIMITS based on the SET TARGET pProfit when the trade starts 1st bar and but note if 2 positions are opened it requires 1 bar after the second position has opened to set the basket/combined limit properly because it still keeps SET TARGET pProfit on the 1st position until the 2nd bar of the 2nd position opening. But then the potential issue with this that 2 of the SELL LIMITS are different and 1 might get hit within the bar but the other might not so the system is back to having 1 position open. 

     

     

     

     

     

     

    #62889

    How are you increasing your “Amnt” variable? If you increase it each time you open a new position with BUY instruction, then there’s no need to wait until the next bar to know how many positions are opened. Without the whole code, it is difficult to get a complete view of your problem.

    #62892

    The Amnt variable is just

    So what you’re stating is correct in theory “if you increase it each time you open a new position with BUY instruction, then there’s no need to wait until the next bar to know how many positions are opened.” but it’s not the case in the demo environment. I will provide sample code and I will try to provide a video later to show how it treats the positions.

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