always execute stop/limit order at next bar

Forums ProRealTime English forum ProOrder support always execute stop/limit order at next bar

Viewing 6 posts - 1 through 6 (of 6 total)
  • #159301

    Hi, I’am stuck on something. It’s not intended for live, but for backtest purpose.

    defparam cumulative orders=true.

    I’ve a buy signal and a long position will be sold at the market next bar open.

    But at the same time I need to buy at that bar where that long position was closed.

    How do I write the condition with stop/limit so the order will always be executed, regardless how the next candle (after the signal) looks or gaps.

    So far I’ve this and works in part. In pic an example where it doesn’t work.

     

    #159305

    You can’t, unless you use the MTF support with a default 1-minute TF and BUY 1 minute after the previous position is closed.

    This is because ProOrder needs one bar before knowing the updated OnMarket status.

     

    1 user thanked author for this post.
    #159309

    Thnx roberto. that’s a shame. I don’t want to use MTF because that defeats the purpose.

    But I’ve changed it a little. Removed the 0.01, the condition is always true.

    It works often now. I will update progress on the concept in the vectorial dax topic.

    1 user thanked author for this post.
    #159436

    Here’s the file i’ve been working on.

    step1 & step2 use with cumulative orders set to true, optimising one or both steps to find good values to be used in step3.

    step3 set cumulative orders to false for live trading

    this is about seeing the trades that the normal backtest might not see because it is already on the market. Now those trades/signals have more meaning when optimising and always have impact. Best is to have all 3 equity-curves look similar (regardless the extra spread/trades with step1/2)

    Maybe it will be useful and can be improved or maybe it’s not useful at all. I’am not sure yet.

    example; dow 5m 100k optimised with a dpo setup for long

    1 user thanked author for this post.
    #159532

    @nonetheless

    After having founded good & robust entry settings, added Roberto’s ts  (disabled pt) and you have on (step3) a nice equity-curve on 200k. Maybe I shouldn’t have posted it here in this topic. But pretty good for an entry parameter with only 1 (best) value which is 100! Should be robust on vrt too I hope.

     

     

     

     

    #159596

    This is a really cool idea – comes close to incorporating VRT at the optimization level by using more of the possible entries. I’ll have to make some time to play around with it, thanks for sharing!

    1 user thanked author for this post.
Viewing 6 posts - 1 through 6 (of 6 total)

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