Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help Converting NT 7 Indicator to NT 8

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

    #16
    Today I tried to Compile my indicator and got the following message:

    \NETFramework,Version=v4\5\AssemblyAttributes.cs

    Duplicate 'global::System.Runtime.Versioning.TargetFramework Attribute' attribute

    I have no idea what this is telling me....


    Click image for larger version

Name:	Duplicate Global System.png
Views:	212
Size:	143.4 KB
ID:	1185556

    Comment


      #17
      By opening the Error message I have found additional information for the Assembly Attributes, but I don't know what it means.


      Click image for larger version

Name:	More Detail On Error of Duplicate.png
Views:	186
Size:	65.6 KB
ID:	1185595

      Comment


        #18
        Hello Taddypole,

        It looks like you have a file generated from Visual Studio that is throwing the compile error.

        Please see here: https://ninjatrader.com/support/foru...-net-framework

        Comment


          #19
          Two files in the NinjaTrader 8/bin/Custom/Object/Debug
          were:

          .NETFramework,Version=v4.6.1.AssemblyAttributes.cs
          .NETFramework,Version=v4.5.AssemblyAttributes.cs

          Moved them to the Desktop and the Compiler errors were corrected.

          Thank you....

          Comment


            #20
            When I hover over SmLR[0] I don't see the value, I only see the constructor. This is different than with NT 7.

            Any suggestions?

            Click image for larger version

Name:	VIsual Studio and Not Seeing Values.png
Views:	192
Size:	859.3 KB
ID:	1185718

            Comment


              #21
              Hello Taddypole,

              Thank you for your reply.

              This is really a Visual Studio topic, so you should seek out their documentation for things of this nature. However, to see the current value, with the debugger attached and a break point set, run the script so it hits the breakpoint, then highlight the object you wish to see the value of, right click > Add Watch to add it to the watch list. The value will then be displayed in the watch list below the code.

              Please let us know if we may be of further assistance to you.

              Comment


                #22
                In NT 7 I never did any thing special. I just ran the code to a breakpoint and hovered over the parameter. And it worked.
                In NT 7 I get the value ... in NT 8 I get the constructor.


                I don't understand?

                Click image for larger version

Name:	VIsual Studio and NT 7 I do see Values.png
Views:	181
Size:	927.9 KB
ID:	1185746


                Click image for larger version  Name:	VIsual Studio and Not Seeing Values.png Views:	0 Size:	859.3 KB ID:	1185744
                Last edited by Taddypole; 01-14-2022, 10:32 AM.

                Comment


                  #23
                  Hello Taddypole,

                  Thank you for your reply.

                  Using a Watch list would be my suggestion to see a value.

                  Since these are questions on Visual Studio features, I suggest consulting Microsoft support for further assistance with Visual Studio and identifying values with a mouse hover.

                  Please let us know if we may be of further assistance to you.

                  Comment


                    #24
                    I don't understand how using the Watch List is going to help.

                    Here's my results using the Watch List...no values are displayed in the Watch List




                    Click image for larger version  Name:	All view values methods are the same.png Views:	0 Size:	1.19 MB ID:	1185757

                    Comment


                      #25
                      Hello Taddypole,

                      Thank you for your reply.

                      You need to highlight the entire object including the [0] to get the current value in the watch list.

                      Microsoft's support site for Visual Studio is publicly available here: https://visualstudio.microsoft.com/vs/support/

                      Please let us know if we may be of further assistance to you.

                      Comment


                        #26
                        That was about 4 hours of work on my behalf to find out that little bit of information.
                        Is that information documented anywhere on NinjaTrader?
                        Would be a nice entry into a FAQ under working with Visual Studio Tips.

                        Comment


                          #27
                          Hello Taddypole,

                          Thank you for your reply.

                          Limited information regarding setting up NinjaTrader for debugging in Visual Studio is available in our help guide:



                          However, since Visual Studio is a Microsoft product and not made by NinjaTrader, you should refer to their documentation and support for additional assistance using that platform.

                          Please let us know if we may be of further assistance to you.

                          Comment


                            #28
                            I noticed that with the "Attach to Process" I didn't know which item to select...



                            Click image for larger version

Name:	Attach to Process.png
Views:	170
Size:	808.1 KB
ID:	1186055

                            Comment


                              #29
                              Hello Taddypole,

                              Thank you for your reply.

                              "Automatic: Native Code" is the correct option (the one that's already checked in your screenshot).

                              Please let us know if we may be of further assistance to you.

                              Comment


                                #30
                                In my conversion there is a lot working but one thing I'm struggling with is my Linear Regression Curve. There is an offset that I can't explain. I have written a new indicator with just the code needed for this curve and it also demonstrates the problem. I have this same code in my NT7 indicator and it all works fine.

                                Can someone help where I might look for this offset? The indicator and a Pic are attached.




                                Attached Files

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                576 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                334 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                101 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                553 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                551 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X