Multiple entries with %profit out

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #13936 quote
    WildBill
    Participant
    Junior

    Hi,

    I am struggling to manage to code for an average %profit out with multiple entries. At the moment i am  using a code that needs  position size and percentage at the close of bar to get out.   In reverse the stop %loss works good for all positions but the multiple entries are only scaled out individualy. I see the PRT platform  backtests the same as well, I am really sratchting my head over this.

    Thanks
    Wildbill

    #13943 quote
    Nicolas
    Keymaster
    Master

    Do you need a percentage profit in money to get out of trades or a %profit of the current price from the average open price of the orders basket?

    #13945 quote
    WildBill
    Participant
    Junior

    Hi Nicolas,

    I am  just looking for the %profit out at in comparison to the average entry price and not in money ,  so the code for example at the bottom of the strategy would be like…….     set cumulative target %profit  0.5

    Thanks

    #13958 quote
    Nicolas
    Keymaster
    Master

    You can calculate yourself what percentage the price gain or loss in comparison with the average price of orders using the POSITIONPRICE instruction.

    #13964 quote
    WildBill
    Participant
    Junior

    I am currently using the position price instruction to exit at all positions at a defined %.     As the  SET TARGET  %PROFIT  syntax will only exit the strategy in true %  inside the bar with a single position.  The use of positionprice only applies to close of bar and positions may not be exited even if the % threshold inside the bar, this because the close maybe different to the high or low of the bar. So maybe the question i should be asking is,  can multiple positions be exited insde the bar in any form,      ie. pips/£/%

    Thanks

    #13972 quote
    Nicolas
    Keymaster
    Master

    Yes, this behaviour is normal because of the not ‘inside bar’ look of Probacktest. The best you can do is to find the correct price level of the percentage of gain you’d like to get out of trades and then set a pending STOP order to close them all at once.

    Of course, because of the same behaviour of the PRT backtest engine, your STOP order will only be tested and placed once per bar.

    #13975 quote
    WildBill
    Participant
    Junior

    Well thats good to know and  now i can stop banging head against the wall to find a solution. A work around has been to re code it all down to a lower timeframe but this has its own problems as well.

    Many thanks Nicolas

    #13978 quote
    Nicolas
    Keymaster
    Master

    Unless we got the multi timeframe support, this is the best you can do: lowering the timeframe used the most possible.

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

Multiple entries with %profit out


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
WildBill @wildbill Participant
Summary

This topic contains 7 replies,
has 2 voices, and was last updated by Nicolas
9 years, 5 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 09/29/2016
Status: Active
Attachments: No files
Logo Logo
Loading...