Strategy get stucks with ProBacktest with both long and short orders

Forums ProRealTime English forum ProOrder support Strategy get stucks with ProBacktest with both long and short orders

Viewing 7 posts - 1 through 7 (of 7 total)
  • #63518

    Good Morning guys,

    I need some help for the following simple strategy.

    Basically if i use the strategies in separated long and short versions, probacktest works fine, but if I use them together in this way probacktests start to calculate and gets stuck.

    Could someone help me and show me if I make some mistakes?

    Thanks a lot in advance.

    Max

     

    #63520

    You should name your variable differently for short and long side of the strategy. For example ‘myindex’ is used in both sides and could generate problem when you compare it with barindex at lines 14 and 35. This is just what first come in mind when reading your code.

    Of course as you already know it, you can have together long and short orders in the same strategy, one cancels other (also known as OCO).

    #63588

    Hi Nicolas, I’ve changed the name of the variables in “mylongindex” and “myshortindex” as you suggested but it doesn’t work the same.

    I’ve also tried with “if not onmarket” instead of ” if not longonmarket” and “if not shortonmarket” but the system doesn’t work either.

    Have you some other ideas?

    Thanks

    Max

    #63597

    I tested your code on Eur/Usd, h1, and it didn’t get stuck, as you can see from the screenshot.

    I only modified the names as suggested by Nicolas and commented out all GRAPH instructions.

     

    #63664

    Hi Roberto, I’ve tried and it works only as soon as i shut and restart the platform, but when i relaunch the system it gets stuck.

    It always works with you ? Have you tried to launch it several times?

    Thanks

    Max

    #63680

    Yes, it works anytime I launch it.

    #63836

    Thanks Roberto, yes probably it’s my internet connection, but it has happened also on the pc where I work.

    Very strange it’s the first time that a system gets stuck.

    Now with the forex market closed it works everytime i launch it.

Viewing 7 posts - 1 through 7 (of 7 total)

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