Same Code but different results on different computers

Forums ProRealTime English forum ProOrder support Same Code but different results on different computers

Viewing 9 posts - 1 through 9 (of 9 total)
  • #71297

    Hi everyone,

    I’m a little desperate because one code I wrote https://www.prorealcode.com/topic/automated-trading-with-pivot-points-and-dojis/page/5/#post-71278 works fine at other people’s computers but for some reason it doesn’t work properly on my computer. What could be the reason for something like that happening, in general?

    Thank you for your help! 🙂

     

    #71300

    I’ve edited your post so that the link points to post with my cleaned up code that we know the results from and I’ll post it here too. Maybe others can test the code and report what results they have for the trade on 20 July 2017 at 13:30 and offer any ideas as to why it is not trading correctly for the OP.

    The correct result can be seen here:

    and the incorrect result can be seen here:

     

    1 user thanked author for this post.
    #71325

    You are comparing 2 different instruments with not the same candlesticks’ OHLC. Even 1 pip could make a difference on how the strategy behaves.

    1 user thanked author for this post.
    #71329

    You are comparing 2 different instruments with not the same candlesticks’ OHLC. Even 1 pip could make a difference on how the strategy behaves.

    I did consider this (I don’t have EurUSD Mini available to me) but the sell condition

    should be met on either chart as the close is less than the low. It is met on mine and Robertogozzi’s but not on the OP’s chart. It would be good if we could see the OHLC values on the chart where it does not close the position.

    1 user thanked author for this post.
    #71337

    EURUSD mini with

    indicator returns the same exact candle than the Spot instrument. Order should be closed here.. don’t know why it doesn’t.

    Do someone tested

    in ProBacktest?

    1 user thanked author for this post.
    #71340

    The problem is fixed by modifying the end of the code:

    Set the exit condition before adding the SELL STOP order solved it. I think that the “ldbs2d” is not at a correct level (above the current level?) and made the code crash somehow..

    1 user thanked author for this post.
    #71342

    Set the exit condition before adding the SELL STOP order solved it. I think that the “ldbs2d” is not at a correct level (above the current level?) and made the code crash somehow..

    That’s interesting. Is that something that PRT could put a fix in for as I suspect that it will not be the only time someone puts the sell orders in that order in a strategy?

    1 user thanked author for this post.
    #71343

    YES, it works:):) You would have thought of that as the reason for the error?:) Thank you so much guys!!!

    #71345

    When the code is logic with variables correctly returned, the first thing to look for is zero divide errors, if it is not solving the problem, start to comment part of the strategy to see if it changes something or not.

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

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