Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Modification of existing indicator

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

    Modification of existing indicator

    I wish to modifiy an existing indicator but keep the functionality of the original existing indicator. I have therefore saved the existing indicator using save as and used another name for it.

    I notice that the compiler gives a message regarding change all references to the previous name of the indicator with the new name. I presume that as long as I do not delete the original indicator and just make modifications to the new indicator the original indicators functionality is preserved and any references to the original indicator should still work.

    Could someone confirm this please before I really destroy my setups

    #2
    Hi MicroAl, correct when you saved the existing indicator as a new one (Save As) the old one and it's dependencies would continue to work.

    Comment


      #3
      enum problems

      On the duplicated indicator there is an enum called maType. I altered the code as I wishes (changed one of the enum fields and respective case statements) but the the compiler then complained that maType was being used elsewhere. I renamed the enum maType to TmaType and changed all references in the code to the new enum. (I did not alter any of the ninja script generated code).

      I then received about 20 error messages regarding am I missing a cast. Any idea what happened here?

      Regrettably I know just enough C# to make me dangerous

      I amended the original indicator to do what I wanted but this was not what I wanted to do.

      Thanks for the previous reply

      Comment


        #4
        MicroAl,

        I suggest you start over. Dump whatever changes you have made and get rid of whatever you were importing. Then on your current indicator which has MAType, change the enum to something else and then compile. If that goes across successfully, then you can import the other script.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by MicroAl View Post
          I then received about 20 error messages regarding am I missing a cast. Any idea what happened here?
          If you use an enum in conjuncton with other data types you need to cast it. That is standard compiler behavior for most of type mismatches in c#.

          Regards
          Ralph

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          596 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          343 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          556 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          554 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X