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

Indiciator compiles but doesn't show up in chart menu

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

    Indiciator compiles but doesn't show up in chart menu

    Hi,

    I have been developing an indicator for a few months now. I am using NT7-64 bit and Visual Studio 2010. My Indicator uses 3 SMAs internally. I also duplicate those SMAs on the chart so that I can see them.

    Just after I got an error loading my indicator, when I subsequently compile my indicator, it no longer shows as a loadable indicator from the Chart menu, despite the fact that the file 'indicatorname.cs' is still in the bin/custom/indicator directory. It compiles fine...it just doesn't show up as available to load on a chart anymore.

    The sequence first started when I did a 'reload ninjascript' and got an error message (two identical) to the effect that an SMA was failing and that the problem was probably that the script was no longer available. I looked at the chart and, sure enough, one of the 3 SMAs was not there (so the identical period internal SMA that my indicator uses may have been having a problem as well). When I went to Chart/Indicators I noticed that there were two missing indicators: one of the SMAs and my indicator. I simply added the missing period SMA back via 'SMA/NEW' with no problem (so the indicator was really still present in the system).

    To add my indicator back, I just compiled it again, expecting it to reappear in the list of loadable chart indicators. It compiles fine but does not appear in the list of loadable chart indicators.

    I then tried to create a new test indicator just from the initial Wizard generated code...the test indicator shows up fine.

    I have tried the following things to fix the problem, all to no avail:

    1. reinstall ninjatrader
    2. add an '@' to the beginning of the file name for my indicator
    3. cut and paste my indicator code over a newly generated wizard script (that had the same name as my indicator)...I really expeced this to work since I can just use the wizard script code and the indicator shows up fine.

    Item #3 suggests to me that the problem is in my code and that I have done something that is preventing the indicator from being loaded into an object library or something like that; however, it compiles fine and whatever the last change I made was certainly supposed to be something simple.

    Note though that the sequence of events was that:

    1. I 'reloaded ninjascript' and got 2 SMA errors (one 'external' displayed on the chart and one 'internal' that my indicator uses).

    2. I added back the 'external' SMA to my chart with no problem

    3. I recompiled my indicator, expecting it to show up...it did not.

    4. Note that in the sequence of events 1-3 just above, there were no coding changes

    I restored a previous 'saved' version of the indicator and I can run it fine and I have compared all of the changes between the previous saved version and the current version, and do not see anything but normal coding changes.

    So how can my indicator compile correctly and not show up in the list of loadable indicators? Was silly or stupid thing could I have done?

    Thanks....I'm kinda stuck on this one.

    #2
    doctore, can you please attach here the version that does not work anymore for you or send to us at support at ninjatrader dot com?

    Did you touch the NS wizard generated wrapper code section or perhaps added some custom DisplayName so in essense it's now showing but under a different name somehow?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hi Bertrand,

      I used WinDiff to compare the two versions and no differences were found in the Ninja Generated code section. I will attach the file and send it to support.

      Comment


        #4
        Ok, thanks looking forward to it.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Here was the problem...it was in the last changes I had made, so it was relatively easy to find.

          the statement :

          TimeSpan tsDaySessionClosePlus30Seconds = new DateTime (2000,01,01,30,00,30).TimeOfDay;

          compiles correctly but causes the indicator to not show up, the reason being is that the hour '30' was an incorrect value.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by itrader46, Today, 09:04 AM
          0 responses
          3 views
          0 likes
          Last Post itrader46  
          Started by timmbbo, Today, 08:59 AM
          0 responses
          1 view
          0 likes
          Last Post timmbbo
          by timmbbo
           
          Started by bmartz, 03-12-2024, 06:12 AM
          5 responses
          33 views
          0 likes
          Last Post NinjaTrader_Zachary  
          Started by Aviram Y, Today, 05:29 AM
          4 responses
          14 views
          0 likes
          Last Post Aviram Y  
          Started by algospoke, 04-17-2024, 06:40 PM
          3 responses
          28 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X