Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Strategy hit target early but actual price never reached

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

    Strategy hit target early but actual price never reached

    Hello Support,
    I have this strange occurrences that has been going on and off for some time. I have strategy under test with with realtime data. This particular one issue, NT7 will generate Target Hit, but the actual price never reach anywhere near there. My strategy target is set at 6 and 22 ticks. I have attached three pictures. First more vertical picture, NT7 generate target hit within the green bar where I have place a vertical line. The output window refers to these trades. Trade is closed at price 66.79. Yesterday CL never reach so low 66.79

    Third picture showing a 2x two shorts, both closed with hit target at same price 66.79. Practically does Enter Short and Hit Target!
    Please let me know how to solve this issue. (This is not due to my code). Does NT7 has some kind of offset due to rollover to new instrument? I do find this issue more often in CL than Index or Currency futures.

    Thank you.
    Attached Files

    #2
    Hello Mokaru Zen,

    Thank you for the post.

    Regarding the strategy, do you see this happen in realtime with any other scripts or manually placed trades? You noted this is not related to your code, is that because you are seeing this happen in other areas of the platform as well? It would be helpful to know if you also see this happen with other scripts to rule out custom logic. If no custom logic is needed to see the issue, we should exclude your strategy from the question and focus on a test that specifically demonstrates this.

    You also noted this happens on and off, is there any specific situation where you can consistently recreate this for testing purposes? Are you able to go back over that time in replay and see the same fill?

    I see in the image with prints that you are printing the bars in progress, is this a multi-series script?

    The CL is a futures instrument so it does have an offset and rollover date and would be managed by the merge policy. I can see in the prints that you are using the CL 12-18 which is the current contract. Can you tell me which data provider is being used for the test?



    I look forward to being of further assistance.



    JesseNinjaTrader Customer Service

    Comment


      #3
      Hello Jesse,
      Yesterday I set up a simple ATM on DOM and entered a short, it went normally. But I also observed my strategy also did not exhibit the issue (while in short way above 66.79).

      My data provider is Mirus-Continuum.

      The strategy at one time was using Bars In Progress for multi-series, but the second time-frame is not driven now, hence BiP showing 0 all the time. The multi-series then was just on the same instrument (it was not a pairs strategy).

      When the symptom came back, yeah I could test a simple script and see if it happens. Would welcome other ideas to isolate this issue. (I do not prefer using replay because it is too cumbersome).

      What is the correct settings to follow for Merging instrument into continuous data-series?

      This thread should have been posted to NT7 instead, regret the misplacement.

      Thank you.

      Mokaru.

      Comment


        #4
        Hello Mokaru Zen,

        Thank you for the reply.

        I will move this post to the NT7 forums.


        For the merge settings, you can review them here:

        The NT8 help guide demonstrates these properties as images as well: https://ninjatrader.com/support/help...rge_policy.htm

        MergeBackAjusted is noted in the help guide as the correct way to make a continuous chart.


        Regarding the original post, It sounds like the problem is not persistent or requires something specific to happen to see it. Because this did not happen when you ran the script again you may need to wait and see when this happens again and take some notes about the situation. If you see this happen in realtime, it would be best to note when that occurred and then retest in replay to see if that can happen again. If so we can test that situation together to find out why that is happening.


        You may also want to check that your PC clock is in sync with the internet time. In some cases, if your time is out of sync that can cause unexpected results which would mainly only be seen during live data or live trades. If you have not synced the clock recently this is another item to check.


        I look forward to being of further assistance.





        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cls71, Today, 04:45 AM
        0 responses
        1 view
        0 likes
        Last Post cls71
        by cls71
         
        Started by mjairg, 07-20-2023, 11:57 PM
        3 responses
        213 views
        1 like
        Last Post PaulMohn  
        Started by TheWhiteDragon, 01-21-2019, 12:44 PM
        4 responses
        544 views
        0 likes
        Last Post PaulMohn  
        Started by GLFX005, Today, 03:23 AM
        0 responses
        3 views
        0 likes
        Last Post GLFX005
        by GLFX005
         
        Started by XXtrader, Yesterday, 11:30 PM
        2 responses
        12 views
        0 likes
        Last Post XXtrader  
        Working...
        X