Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Question on Strategy/Code Debug cycle

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

    Question on Strategy/Code Debug cycle

    Hi All
    I have spent quite a bit of time converting an indicator to a Strategy complete with adding
    visual information to assist in discerning the best trade setup and executions. Much to my dismay when I disable the strategy to inhibit new trades so I can focus on debugging whether trades are being taken correctly all the visual information including Ninja Trade markers disappears. I could see one possible solution which would be to take a Giant step backwards and separate my Indicators from the strategy and then connect thru Exposed variables such that the indicators and any trade information I wanted was plotted thru the indicator. But this seems to me the wrong way to be going. Is there a way around this to retain information on the chart.

    Thanks
    Jerry

    #2
    Hello JerryWar,

    The executions you are seeing in the back test are not real trades and thus will go away when the strategy is disabled. Only live trades meaning placed with live data by manual or strategy will show up on a chart and remain there until cleared out from the local database.

    There is no way around this except to use the Strategy Analyzer so that the orders remain on the performance chart until the strategy is ran again.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Cal
      This was not back testing, I was using the Sim Account trading off live data. So are you saying that the Sim Account is treated differently than a real account. Yet when I trade manually with the Sim account all my trades remain. What am I missing.

      Comment


        #4
        Can you show me an example or screenshot of what you are doing for the chart?

        To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and add the file as an attachment. Reply -> Go Advanced -> Paperclip in the top toolbar

        For detailed instructions please visit the following link

        http://take-a-screenshot.org/
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by JerryWar View Post
          Cal
          This was not back testing, I was using the Sim Account trading off live data. So are you saying that the Sim Account is treated differently than a real account. Yet when I trade manually with the Sim account all my trades remain. What am I missing.
          When you stop/disable a Strategy, everything in connection with it disappears from the chart, except the legend of the Strategy itself.

          Comment


            #6
            Originally posted by koganam View Post
            When you stop/disable a Strategy, everything in connection with it disappears from the chart, except the legend of the Strategy itself.
            Koganam

            I got it. But if I can impose on you for one more answer, let me ask this. I can't be the first to want to visually examine the trades on chart vs. their indicators to debug their code and trade logic. Their are so many potential exceptions with what I am doing that I want to just let the market enumerate all conditions that happen with any regularity. I can only think of passing the trade info back to an indicator which marks up the same chart and hopefully then the info will remain. Is there some other method that might work to accomplish this, as I indicated, I can't be the first to climb this hill.

            Thanks
            Jerry

            Comment


              #7
              Originally posted by JerryWar View Post
              Koganam

              I got it. But if I can impose on you for one more answer, let me ask this. I can't be the first to want to visually examine the trades on chart vs. their indicators to debug their code and trade logic. Their are so many potential exceptions with what I am doing that I want to just let the market enumerate all conditions that happen with any regularity. I can only think of passing the trade info back to an indicator which marks up the same chart and hopefully then the info will remain. Is there some other method that might work to accomplish this, as I indicated, I can't be the first to climb this hill.

              Thanks
              Jerry
              You can have your indicator plot entry/exit signals .

              Comment


                #8
                Originally posted by JerryWar View Post
                Koganam

                I got it. But if I can impose on you for one more answer, let me ask this. I can't be the first to want to visually examine the trades on chart vs. their indicators to debug their code and trade logic. Their are so many potential exceptions with what I am doing that I want to just let the market enumerate all conditions that happen with any regularity. I can only think of passing the trade info back to an indicator which marks up the same chart and hopefully then the info will remain. Is there some other method that might work to accomplish this, as I indicated, I can't be the first to climb this hill.

                Thanks
                Jerry
                Yes, and no. There have been times when I have had no choice but to pretty much convert my Strategy into an indicator, so that I can step through it bar by bar. However, it is often also enough to simply examine variables at the critical points that I want to examine, by printing them to the Output Window. It actually works pretty well.

                Comment


                  #9
                  Sledge, I think your right rather than totally undo what I have done all I need to do is pass some limited info for markers.

                  Thanks

                  Comment


                    #10
                    Koganam, I already print a list I accumulate, formatted for easy import to excel so I can Statistically analyze the setups and results. But I had been anticipating analyzing the setups and trades visually as well. I think Sledges idea is easy to code and will do what I need.

                    Thanks,
                    I appreciate the input.
                    Jerry

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    650 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    370 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    109 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    574 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    577 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X