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

    Strategy disappeared after an error, strategy is not visible

    Hello,

    I got any error with my strategy file. Dont remember which one, but NOT within the code, the code compiles without errors. After the error, the strategy disappears in the chart menu or even in the Strategy Builder.

    I did many measures to resolve the issue, i deleted all other older strategies what could have caused issues. Then i setup the system new and clean like described by Brendon in another thread.
    I copied the MyStrategy.cs file in the Strategies folder, it shows up in the editor, it compiles but still not visible in chart etc.

    Then i tried to export the strategy, deleted the MyStrategy file in the folder and imported the file, there i got an error "The Ninjascript Archive file may contain duplicate method names that already exist on your pc modify a method signature....." but where to find duplicate methods if no error in the editor ???

    EDIT: the files saved and after new installation copied was the config and ui.xml, the workspace, db, and templates folder. I guess that there is one file i copied where these duplicates are still existing

    What i also tried, is to setup a new strategy, renamed and copied the code into the new strategy, it compiles, but not visible eitherin Chart or Analyzer
    Last edited by Triple_M; 03-12-2024, 01:59 AM.

    #2
    Hello Triple_M,

    Thank you for your post.

    If the strategy disappears from the chart and the Builder after the error appears, it would be necessary/helpful to know what the error you are seeing says. Can you try reproducing the behavior and get a screenshot of the error?

    When you say it disappears from the chart, are you able to find in the list of Strategies to add it from the chart? Or does it disappear after adding to the chart?

    Is it possible for you to share the script, or a reduced version that still duplicates the behavior, for testing?

    I look forward to assisting further.
    Gaby V.NinjaTrader Customer Service

    Comment


      #3
      No, not possible to reproduce, because different measures i have taken so far. The strategy itself, renamed as a new strategy, compiles and everything fine, but still not visible, obviously because the used Indicators. First logfile said, MarketAnalyzerColumn already defines a member called "theIndicator", there it stucks.

      I tried to rename the indicators to override this. Then to export the strategy, and then import it again, that failed, logfile says due to another indicator not found. I renamed also this indicator and will try this at the next step.

      So the cause must be somewhere in a file that attempts the MarketAnalyzerColumn, can I somehow fix this?

      EDIT: I use three indicators Ind1 Ind2 Ind3, when i try to export the strategy, now second time, it now calls Ind3 with the same said above.
      To repeat it, i copied the strategy.cs file manually in the folder bin/custom/strategies, it pops up in the Editor, compiles, then export it to a zip file, then import it, ...errors, attached the logfile

      EDIT2: i deleted the db cache file, dont works again the import error attached
      Attached Files
      Last edited by Triple_M; 03-13-2024, 11:33 AM.

      Comment


        #4
        Hello Triple_M,

        Does the Name property set in State.SetDefaults match the filename?

        Are there any errors on the Log tab of the Control Center when opening the Strategies window?

        According to the Log, it looks like the strategy has some compile errors, so you won't be able to add it to the chart/run it until these errors are resolved.

        Open the NinjaScript Editor > open your strategy > right-click within the window > Compile.

        All the compile errors will be listed at the bottom, along with the line that is causing the errors.

        Can you please share the compile errors and the lines that are causing the errors?
        Gaby V.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Gaby View Post
          Hello Triple_M,

          Does the Name property set in State.SetDefaults match the filename?

          YES

          Are there any errors on the Log tab of the Control Center when opening the Strategies window?

          According to the Log, it looks like the strategy has some compile errors, so you won't be able to add it to the chart/run it until these errors are resolved.

          Open the NinjaScript Editor > open your strategy > right-click within the window > Compile.

          All the compile errors will be listed at the bottom, along with the line that is causing the errors.

          Can you please share the compile errors and the lines that are causing the errors?
          I tried now to export the both Indicators and imported in again, with another names, and i created again a new strategy, copied the code and paste it. NOW it don´t compiles attached the error messages
          Attached Files

          Comment


            #6
            ...and the complete code file

            EDIT: if I delete the PM_Strategies subfolder for the MA_Differences, it is found, but the Slope_of_MA still not .....hmmm
            Last edited by Triple_M; 03-13-2024, 12:31 PM.

            Comment


              #7
              Hello Triple_M,

              Thank you for your response.

              Have you removed the Slope_of_MA and MA_Differences indicators? Or renamed them?

              This error occurs when the script you are referencing no longer exists / has been removed.

              I look forward to assisting further.
              Gaby V.NinjaTrader Customer Service

              Comment


                #8
                Originally posted by NinjaTrader_Gaby View Post
                Hello Triple_M,

                Thank you for your response.

                Have you removed the Slope_of_MA and MA_Differences indicators? Or renamed them?

                This error occurs when the script you are referencing no longer exists / has been removed.

                I look forward to assisting further.
                I removed it and imported it "new" they are existing now, they are even visible in the chart, i will now try to delete the subfolder, may be it works then

                EDIT: what i am wondering, i deleted the subfolder PM_Strategies for both indicators but in the chart there is the subfolder still visible.....
                the MA_Differences is found by the strategy, but the Slope_of_MA ...still not. .....holy s....
                Last edited by Triple_M; 03-13-2024, 12:47 PM.

                Comment


                  #9
                  Now it is getting more weird...... i exported both indicators again, deleted it. Imported it, ....and now the Slope_of_MA is imported .......working in the chart, BUT not visible in the Editor anymore ????? And the MA_Differences, was not able to import....

                  Comment


                    #10
                    Hello Triple_M,

                    Are these scripts you've created, or ones from a third party?

                    What happened when you tried to import the MA_Differences indicator?

                    Go into the NinjaTrader 8 > bin > Custom > Indicators folder. Are the MA_Differences and Slope_of_MA listed there? Please take a screenshot if possible.
                    Gaby V.NinjaTrader Customer Service

                    Comment


                      #11
                      No, not from a third party and also No, they are not listed in the Indicator folder. When i import the MA_Differences, i get the attached error message

                      ...it seems like there must be another "ghost" Indicator folder, where the one Indicator is still in place and the other (Slope_of_MA) is stored
                      Attached Files
                      Last edited by Triple_M; 03-13-2024, 02:51 PM.

                      Comment


                        #12
                        Hello Triple_M,

                        In an earlier post, you stated:

                        I tried now to export the both Indicators and imported in again, with another names
                        If you imported them with other names but didn't remove the previous versions, this would likely be the cause of this error since the files are likely identical.

                        I recommend removing any previous version of the indicator with different names before attempting to re-import them.
                        Gaby V.NinjaTrader Customer Service

                        Comment


                          #13
                          .....yes, i know, i renamed, exported, deleted the old ones, .....tried to import again, and got the error message, during import that they still exists. Thats exactly the problem, they are not visible anymore!!! In the NT8/bin/Custom/Indicator file there are actually no files but the standard indicators. Means that these old files stuck somewhere in the system and the question is where it can be?

                          Or another question, if i install the system new and clean, which file i can copy and paste later to avoid the doubles?

                          Comment


                            #14
                            Hello Triple_M,

                            Thank you for your inquiry.

                            Can you send a screenshot of everything in your NT8/bin/Custom/Indicators folder?

                            If you do a clean install, you can copy and paste the .cs files into the bin/Custom/Indicators folder. I would only do this with the original files.

                            Or you can import the .zip files from the Control Center > Tools > Import > NinjaScript Assembly if you have them.

                            If you would like instructions on doing a clean install, please let me know.
                            Gaby V.NinjaTrader Customer Service

                            Comment


                              #15
                              I have the clean install advice from an issue before from Brendon

                              Close NT
                              Copy the NT8 folder to NT8_Old
                              Delete NT8 through windows system
                              Restart
                              Install new NT
                              copy Config.xml UI.xml, Workspace, Templates, db folder from NT8_Old to NT8 and overwrite it.

                              Do you recommend doing the same?

                              Attachted copy of the Indicator folder. The Gemify subfolder is only ICTFVG.cs (not used in the strategy)

                              EDIT: ......funny is!!!! I tried actually to search for all .cs files and found the exisiting indicator what is not in the Indicator but in the Custom section, dont know why
                              Attached Files
                              Last edited by Triple_M; 03-14-2024, 07:46 AM.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by StockTrader88, 03-06-2021, 08:58 AM
                              44 responses
                              3,967 views
                              3 likes
                              Last Post jhudas88  
                              Started by rbeckmann05, Today, 06:48 PM
                              0 responses
                              4 views
                              0 likes
                              Last Post rbeckmann05  
                              Started by rhyminkevin, Today, 04:58 PM
                              4 responses
                              55 views
                              0 likes
                              Last Post dp8282
                              by dp8282
                               
                              Started by iceman2018, Today, 05:07 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post iceman2018  
                              Started by lightsun47, Today, 03:51 PM
                              0 responses
                              8 views
                              0 likes
                              Last Post lightsun47  
                              Working...
                              X