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

Daily Pivot Points

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

    #16
    When you save a copy of it, your code still have the same enumerations with the same names. You'll have to change those if they're public or they will conflict with the one you made a copy of.
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #17
      Hello kiro1000,

      Thanks for your notes.

      QuantKey_Bruce is correct and has provided some great advice.

      The public enums would need to have a unique name such as "MyHLCCalculationMode" instead of the default "HLCCalculationMode".

      PivotsTypeConverter would also need to be changed to something like "MyPivotsTypeConverter"

      And, on line 456 "(Pivots) value" would need to be changed to the name of the indicator, such as "(PivotsMyPIVOTS) value"
      Brandon H.NinjaTrader Customer Service

      Comment


        #18
        Hello,

        Thank you Bruce and Brandon for your message and guidance.

        Thank you very much Brandon for your clear and very well explained answer.

        I've implemented the recommended changes, ensuring unique names for public enums, such as "MyHLCCalculationMode" and "MyPivotsTypeConverter." The adjustments compiled successfully, and I appreciate your assistance.

        However, when attempting to load the indicator on the chart, a message box displayed the following :


        Click image for larger version

Name:	MessageBox.png
Views:	87
Size:	5.2 KB
ID:	1278764
        Unhandled exception: Impossible to cast an object of type 'NinjaTrader.NinjaScript.Indicators.MyPivots' in type 'NinjaTrader.NinjaScript.Indicators.Pivots'

        Thanks and best regards,​​

        Comment


          #19
          Hello kiro1000,

          Thanks for your notes.

          To resolve this error message you would need to edit the TypeConverter around line 33 to reflect the correct name.

          This code below:

          [TypeConverter("NinjaTrader.NinjaScript.Indicators. PivotsTypeConverter")]


          Should be changed to something like this:

          [TypeConverter("NinjaTrader.NinjaScript.Indicators. MyPivotsTypeConverter")]

          Brandon H.NinjaTrader Customer Service

          Comment


            #20
            Hello Brandon,

            Thank you for your prompt response and guidance.

            I've successfully made the suggested change in the TypeConverter around line 33, updating it to reflect the correct name.

            I'm pleased to share that it works !

            Your assistance has been invaluable in resolving this issue

            Thanks again for your support

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by fx.practic, 10-15-2013, 12:53 AM
            5 responses
            5,404 views
            0 likes
            Last Post Bidder
            by Bidder
             
            Started by Shai Samuel, 07-02-2022, 02:46 PM
            4 responses
            95 views
            0 likes
            Last Post Bidder
            by Bidder
             
            Started by DJ888, Yesterday, 10:57 PM
            0 responses
            8 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by MacDad, 02-25-2024, 11:48 PM
            7 responses
            159 views
            0 likes
            Last Post loganjarosz123  
            Started by Belfortbucks, Yesterday, 09:29 PM
            0 responses
            8 views
            0 likes
            Last Post Belfortbucks  
            Working...
            X