Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Wrong Error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Wrong Error

    Hello,

    I am attaching screenshots of a very strange error that I cannot understand.

    I explain the scenario to you first:

    I have three charts open, one for each of the following markets:
    • M6E 12-21
    • M6A 12-21
    • M6B 12-21

    In each of them run strategies that I have programmed and tested for more than a year without any problem.

    I also have two computers:
    • Computer D: Development computer where I develop and test the strategies
    • Computer P: Production computer where I have put the strategies to work against a real account (but in simulated mode actually)
    With the above scenario explained, Computer P had a very rare performance on 11/03/2021 at 17:00:01. At that time, my strategies had 2 Short positions open (since 11/02/2021 at 17:00:01) in the M6E market and I decided to buy 2 Long positions. This order must:

    1.- Close the 2 Short positions bought until that moment
    2.- Cancel the Profit Target set up to that moment
    3.- Cancel the Stop Loss set up to that moment
    4.- Buy 2 Long positions

    However, as shown in the attached images, it has not acted correctly.

    Before notifying you of this incident, I downloaded the data from the three markets from November 1 to 4 on Computer D and configured it exactly the same as Computer P:
    • Same 3 graphics and markets
    • Same loaded strategies and same configuration
    • Same version of Ninja (8.0.24.3 64-bit)

    And I have executed everything with the Market Replay.

    In Computer D everything has worked perfectly as expected.!!!

    In fact, I have attached a screenshot of the "Orders" tab of both computers. You can see that they are exactly the same (it only changes on occasions that in one case the "Close position" is done before the cancellation of Profit Target and Stop Loss and in another after, but in my opinion it is not something relevant and, in any case it is something Ninja manages, not my strategies)

    The funny thing happens in the screenshots of the "Executions" tab. In the Computer D, it is perfectly observed how the "Close position" of 11/03/2021 causes an "Exit" of 2 positions in said market, leaving it in 0 open positions (-) before the "Entry" named "Cross to Cross Long" that opens 2 Long positions. Everything Ok.

    But if you look at the screenshot from Computer P, it doesn't do the same.

    Can you explain to me what happened on Computer P?

    Thanks in advance

    All the best.
    Attached Files

    #2
    Hello Jose Francisco Rangel,

    Thank you for your post.

    It's unclear from your screenshots why it would go from a 2 short to a 2 long position.

    I would first suggest clearing your cache in case there's an issue with cached bars causing an incorrect execution.

    To delete the cache, follow the steps below.
    • Shut down NinjaTrader.
    • Open the Documents > NinjaTrader 8 > db folder.
    • Delete the sub-folder named 'cache'.
    • Restart NinjaTrader and test.
    Once you've deleted the cache, I would suggest resetting playback on Computer P, and rerun just this particular strategy again. Does the same occur when playing back over the same time frame?

    Thanks in advance; I look forward to assisting you further.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Hi Kate,

      Now yes, everything is correct.

      In Computer P, I have cleared the cache, downloaded the data of the three markets, loaded the strategies and executed the Market Replay and everything has worked as it should (As in Computer D)

      I wanted to ask you a question:

      This failure has occurred in a simulated account against a real connection, but ..

      Could it also occur against my real account through the same connection? In that case, does the cache also intervene or not?

      It is something that worries me for when I work in real.

      Thanks in advance.

      Comment


        #4
        Hello Jose Francisco Rangel,

        From the given details it seems that it may relate to a difference in the data between the two machines at the time of the test. Depending on how your strategy works you could certainly see differences between two machines in realtime on a live account as well.

        If the difference related to the data it is highly likely that two scripts would start to perform differently at some point as it progresses. This can happen for any barstype however for tick base series you can see differences very quickly as the bars could build differently if either machine has different data.

        The cache simply speeds up load times in the platform, if clearing the cache and reloading the data resolved the difference it is likely just that there was different data downloaded or cached on each machine. If you are doing this type of comparison it would be best to just re download the data for the test on each machine before testing. You can also transfer data from one machine to another if you have the means to do that (usb drive/way to transfer files).



        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Gerik, Today, 09:40 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by RookieTrader, Today, 09:37 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by alifarahani, Today, 09:40 AM
        0 responses
        5 views
        0 likes
        Last Post alifarahani  
        Started by KennyK, 05-29-2017, 02:02 AM
        3 responses
        1,284 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by AttiM, 02-14-2024, 05:20 PM
        11 responses
        185 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X