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 disappeared after an error, strategy is not visible

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

    #16
    Hello Triple_M,

    I would search in the NinjaTrader 8 folder for any Slope_of_MA and MA_Differences files and delete them.

    If these are indicators, they should only be in the bin/Custom/Indicators file folder.

    If after doing so, you are still having issues, I would recommend a clean install.

    Please let me know if I can assist further.
    Gaby V.NinjaTrader Customer Service

    Comment


      #17
      I have setup a new clean system as described above. I also found the indicator issues and solved them. The strategy file "MyDance15min110324" does compile. The .cs file is in the right folder. It is visible in the Editor. BUT STILL NOT VISIBLE in the chart !!! and not possible to chose.
      Attached Files
      Last edited by Triple_M; 03-14-2024, 01:26 PM.

      Comment


        #18
        Hello Triple_M,

        Are there errors appearing on the Log tab of the Control Center when opening the Strategies window?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #19
          Yes !!! Error on calling OnStateChange method: Object reference not set to an instance of an object

          Comment


            #20
            GOT IT !!!!

            thats the code causing the error......

            previousAccountBalance = Account.Get(AccountItem.CashValue, Currency.UsDollar);
            BaseOrderQuant = 2; // This will be set based on account size in OnStartUp() or OnBarUpdate() when a new day/session starts.
            CurrentOrderQuant = BaseOrderQuant;​

            the definition on the second line BaseOrderQuant = 2 ..... causes the error... hmmmm and why?

            Probably because the Account.Get function is called to early, i moved it to State.DataLoaded, that works !!!!

            THANK YOU Chelsea, that was the helping hint, sorry for so much confusion!
            Last edited by Triple_M; 03-14-2024, 03:09 PM.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Harry, 05-02-2018, 01:54 PM
            10 responses
            3,203 views
            0 likes
            Last Post tharton3  
            Started by cre8able, Yesterday, 01:16 PM
            3 responses
            11 views
            0 likes
            Last Post cre8able  
            Started by ChartTourist, Today, 08:22 AM
            0 responses
            6 views
            0 likes
            Last Post ChartTourist  
            Started by LiamTwine, Today, 08:10 AM
            0 responses
            2 views
            0 likes
            Last Post LiamTwine  
            Started by Balage0922, Today, 07:38 AM
            0 responses
            5 views
            0 likes
            Last Post Balage0922  
            Working...
            X