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

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.
    BertrandNinjaTrader Customer Service

    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 DustyContrer, Today, 04:02 AM
          0 responses
          3 views
          0 likes
          Last Post DustyContrer  
          Started by ETFVoyageur, Today, 02:15 AM
          0 responses
          11 views
          0 likes
          Last Post ETFVoyageur  
          Started by Board game geek, Today, 01:34 AM
          0 responses
          9 views
          0 likes
          Last Post Board game geek  
          Started by morrnel, 05-12-2024, 06:07 PM
          3 responses
          43 views
          0 likes
          Last Post wzgy0920  
          Started by FishTrade, Yesterday, 11:11 PM
          0 responses
          7 views
          0 likes
          Last Post FishTrade  
          Working...
          X