Probacktest shots random orders

Forums ProRealTime English forum ProOrder support Probacktest shots random orders

  • This topic has 4 replies, 4 voices, and was last updated 3 days ago by avatarIván.
Viewing 5 posts - 1 through 5 (of 5 total)
  • #246262

    Hi everyone,

    Im working on the system below,  DXSXXXX, 1H, tick by tick no available (Im not suscribed to data).

    The point is that ProBackTest shots random orders (see the image attached) that get closed on the same bar. However, I am just using market orders, and set a condition to keep open a trade for 2 or more candles.

    Thank you,

    #246265

    If you get your Platform via IG you will have tick by tick mode and full date for free / minimum 4 trades per month (like most of us are doing).

    In my opinion, you are wasting your time backtesting without tick by tick.

    Also we can’t help you as your problems may be caused by NOT using tick by tick in backtest … this likely is  responsible for, at least, some of the ‘zero bars’ that you are experiencing.

     

    3 users thanked author for this post.
    #246285

    Hi @GraHal,

    Thank you for your advice, I found that the realtime data is only 2eur/month, so I added it to my account.

    Then I retested the system, with same condtions, and the problem persists…

    Find attached  a screenshot.

    Thank you so much for your always help.

    #246287

    In addition to @Grahal comments.

    I don’t know if this is a similar problems I found on some other code I was looking at but…

    When the code is run, and an order entry condition is true, it’s not till the start of the next bar that the order is executed. Till then, the ‘NEW’ calculated Stoploss and target are still invalid even though there code line have been run.

    I think the entry order is first executed before the new stop and targets can be set.

    However, till then, the old stop and targets values may still be valid till overwritten by the new values.

    But when the new entry is made, if the previous stop/target fall such that their values are triggered, the trade is exited at the same entry price as it tried to enter.

    This exit means that the newly calculated stop/target values never becomes valid orders, and never overwrite the prior valid values and all valid entries that follow execute the same way.

    Until the price changes to a value which removes this instant exit, the new stop and target will then become the new valid ones, and the cycle repeats.

    Though I can’t tell directly from the image if this is the same thing, it looks like it, It wouldn’t surprise if the entry/exit is the same value. Also the last valid trade was a long with its stop below entry, which was hit, and the following 3 short trades look like their entries are above that’s valid trades stop level, so if these try to enter, this valid prior  stop is already being hit, because the stop level is below the entry level for the short.

    If nothing else changes this situation, the next valid trade will possible be a long entry above the last valid stop, ( long stop below entry level) a short entry below the last valid stop s(short stop above entry level) , if i’m right!

     

    4 users thanked author for this post.
    #246291

    I haven’t tested it, but in addition to the previous comments what looks odd in your code is that you’re not conditioning the time-based exit on being in the market.
    Try placing the time-based exit expressions inside the longonmarket/shortonmarket condition, or combine it using onmarket.

    2 users thanked author for this post.
Viewing 5 posts - 1 through 5 (of 5 total)

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