Exit and Reenter same bar

Forums ProRealTime English forum ProOrder support Exit and Reenter same bar

Viewing 15 posts - 16 through 30 (of 38 total)
  • #70356

    Not a single one provided does what I ask? I have even replied with photographs of the charts disproving them as solutions?

    #70359

    I can’t figure out what your last pic means, why the yellow arrow?

    It’s not a screenshot if your Backtest, is it?

    #70361

    The yellow arrow is showing an example in TradeStation where I can exit on the open and re-enter the next trade on the same open (desired effect). We have yet to find a way to do this in PRT – if so please attach an image of such.

    #70362

    It is NOT possible to reenter within the same bar, because each strategy is executed at the END of a bar, so once a trade is entered ProOrder won’t check conditions again before the bar closes.

    When the expected MTF (Multi Time Frame) will be available, it is rumoured before the end of this year, a workaround will be to use lower TFs (even a 1-second TF) to check if a trade has been closed and conditions are still valid to open a new one. You will be able to write a strategy for higher TFs, but still being able to take control of what’s going on much earlier that THAT bar is closed!

     

    #70363

    Everyone here is helping on their spare time, so please be patient 😉

    Orders are not “merged”, they exit and they open at next Open (attached picture).

     

    #70366

    Ok, I did not think it was possible. Thank you for helping and confirming. I will wait until upgraded to continue support for PRT.

    #70368

    Nicolas,

    if your image shows one trade exiting on the open and the second trade entering on the same open then that is exactly what I am after! Do you have code to produce this you can share? I am not able to replicate this with any of the previous code in this thread.

    Thanks,

    David

    #70381

    It seems you’ve already been given solutions.

    Roberto was right, this is the code from that post: https://www.prorealcode.com/topic/exit-and-reenter-same-bar/#post-70135

    #70384

    Please advise as this solution does not work. You can see in the green box trades are lasting longer than 1 bar and there are no examples of ‘re-entering’ on the same open as an exit.

    #70417

    It did last ONE bar, you may take note that the closing price of that trade is the closing of the previous bar, BUT  when a daily bar closes it’s a new day, so I guess ProOrder displays the cross above the new bar, but actually that trade did not last more than one bar!

    Anyway, can you tell me the instrument, dates and time of your backtest so I can replicate it. Thanks.

    #70419

    This does not make sense at all. It should exit where the orange line is (and orange drawn ‘x’ is) with a one bar hold exit. It should also re-enter a new trade at the orange line as previous bar has entry condition (low[0] <= low[1] == True).

    #70425

    Sorry, I can’t replicate it without info.

     

    #70427

    The info is in the photos. So is the code. Should have no trouble replicating.

    2 years of daily SP500 index.

    Thanks,

    David

    #70438

    Sorry, but I can’t find that index. I tried it on DAX daily and I could not find any trade lasting more than one bar!

    #70441

    Robert, please show your code and proof. I have ran the ‘solution’ code on DAX (as you have claimed to do) and you can clearly see in the attached image it is holding trades for longer than one bar and there are NO instances of a trade exit occurring on the open and a re-entry occurring on that same open.

    If this cannot be done in PRT then please just say that. However, please do not tell me there is a solution if when there is not.

    This is a huge waste of time. if there is a solution then great please provide code and visual proof. If not, then just say so! Why are you making this more difficult than it has to be?

    For the record, the ‘US 500’ is the S&P500 (Standard and Poor’s 500) index from the United States. Regardless, it does not matter the symbol this code is run on – I think you know that.

Viewing 15 posts - 16 through 30 (of 38 total)

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