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

Difference

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

    Difference

    Why do I see a difference in running the same strategy performance report in the Analyzer and on running it on a chart?
    Thanks.
    Attached Files

    #2
    Hello Trader17,

    Thank you for the post.

    This would not be enough information to answer your question but based on this image I can see that the number of trades were different so we should not expect a matching performance report here.

    To know why it was different, that would come down to the specifics of the test and your logic.

    To start, are you comparing historical results only from the chart and does the chart have identical settings as the backtest?

    The setup between the two tests will be very important in getting similar results. This would include all settings and data, the data would need to match the backtest exactly so that your strategy can run over the same timeframe again in the same way.

    Besides this, are you certain that all conditions to trade became true in the same way as the backtest? To know this, you may need to add debugging into the script such as using Prints to confirm it is working in an identical way. Once the logic is able to run in an identical way over historical data you should see similar results between historical tools. If the logic is not able tore-run in the exact same way, that could create completely different results depending on the logic being used.


    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks. For some reason the Strategy Analyzer was taking way more trades. Is there anything in the Builder that can limit open positions to just one and confirm it closed before opening another?
      Thanks.

      Comment


        #4
        Hello Trader17,

        It would generally be your logic that determines when to enter another trade to open a position.

        From the builder you could use:

        Strategy -> CurrentMarketPosition
        equals
        Strategy -> Market Position -> Flat
        to check if you are currently in a position or not as one way of doing this.

        I look forward to being of further assistance.

        JesseNinjaTrader Customer Service

        Comment


          #5
          Thanks. So basically when it is calculated on close it should not take more than one trade per trade, correct? Or rather open only one position in that direction till the next close to re-evaluate.
          Thank you.

          Comment


            #6
            Hello Trader17,

            Correct this would limit the condition to only work when you are flat, if there is a position it would not work until that position is closed or you are flat again.

            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by traderqz, Today, 12:06 AM
            2 responses
            3 views
            0 likes
            Last Post traderqz  
            Started by RideMe, 04-07-2024, 04:54 PM
            5 responses
            28 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by f.saeidi, Today, 08:13 AM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by DavidHP, Today, 07:56 AM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_Erick  
            Started by kujista, Today, 06:23 AM
            3 responses
            11 views
            0 likes
            Last Post kujista
            by kujista
             
            Working...
            X