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

Bug in Strategies Tab?

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

    Bug in Strategies Tab?

    Hello,

    Please see the attached simple test.

    Add the strategy to the tab, set Data Series - Type = Day. Nothing will be printed in the output window.

    Workaround:
    Now but set the Data Series - Type = Minute. Run it, you should see many prints in Output window. Turn the strategy off, and set Data Series - Type = Day. You should see many prints again and that means the strat is working now.
    Attached Files

    #2
    Hello frslvr,

    I am not certain what the problem with your sample is, i tried to re generate the sample using the strategy builder and then unlocked the code. I see that works to print. I attached that test script for you to try.

    Attached Files
    JesseNinjaTrader Customer Service

    Comment


      #3
      Here is the problem: Add the strategy to the tab, set Data Series - Type = Day. Run it and nothing will be printed in the output window.
      Works only if you run it first as Minute Type.

      Comment


        #4
        Hello frslvr,

        I was able to see the problem with your script using the tab, I can no longer see the problem using the script I had attached. I don't see anything specific in your sample, I would suggest to use the strategy builder to generate a new strategy that has all the correct using and formatting. Your strategy has all of the standard default properties and using statements removed, because of that I would suggest starting with a new sample by generating the script using the builder like the one I had attached.




        JesseNinjaTrader Customer Service

        Comment


          #5
          For my test I used the @SampleMACrossOver.cs, and just added the AddDataSeries and Prints. And this script failed to run. Then I just removed extra stuff for simplicity.
          I develop custom strategies and this bug was reported by one of my clients.
          I actually don't understand how to fix this bug on my side.

          On one of my computers, some strategies work ok now (but not before).
          On another one, it won't work.
          Last edited by frslvr; 06-17-2022, 11:36 AM.

          Comment


            #6
            Hello frslvr,

            I don't see anything with the file that would cause a problem besides the normal items missing, I would suggest trying to re generate the script by using the strategy builder. Its possible that some process that was followed with the copy of the other sample and how it was edited was the cause.

            To make a copy of a script the NinjaScript editor should be used, you can open the file and use Right click -> Save As to generate a copy.

            I otherwise cannot produce the problem on my end without using that specific file, any other file I generate works while using AddDataSeries and the control center.




            JesseNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by AaronKoRn, Today, 09:49 PM
            0 responses
            2 views
            0 likes
            Last Post AaronKoRn  
            Started by carnitron, Today, 08:42 PM
            0 responses
            7 views
            0 likes
            Last Post carnitron  
            Started by strategist007, Today, 07:51 PM
            0 responses
            8 views
            0 likes
            Last Post strategist007  
            Started by StockTrader88, 03-06-2021, 08:58 AM
            44 responses
            3,975 views
            3 likes
            Last Post jhudas88  
            Started by rbeckmann05, Today, 06:48 PM
            0 responses
            9 views
            0 likes
            Last Post rbeckmann05  
            Working...
            X