• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to extend an indicator class from a zipped archive?

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

    How to extend an indicator class from a zipped archive?

    Is there a trick needed in order to extend existing C# indicator classes? It seems like I'm running into this problem with C# where the virtual methods can act strangely and not invoke the expected overridden virtual methods in subclasses if the superclasses are in dlls or have been assembled in different locations:

    http://stackoverflow.com/questions/6...ion-not-called

    Basically I have the GomDeltaIndicator in a zip which I've installed and it works fine. In my class I have:

    "public class MyGomVolumeLadder : GomDeltaIndicator"

    And MyGomVolumeLadder is just a copy and paste of the original GomVolumeLadder.cs.

    I can compile and run MyGomVolumeLadder on a chart, it gives no errors but it never gets any tick data and tracing through with Print statement it's because the base GomDeltaIndicator class is only calling its own methods, and never calls the overridden tick accumlator methods in MyGomVolumeLadder.

    Is there a trick to get around this?

    #2
    Meinl,

    Just to make sure we are on the same page, if you have the 'source' for all the indicators and compile there is no problem? Then as you export the 'source' as DLL's and delete the 'source' + re import the DLL on the development computer is when you run into the issue?
    BrettNinjaTrader Product Management

    Comment


      #3
      I got it working, I removed the zips, upzipped the source files and added them directly, restarted NT and then reimported the source, then recompiled and the virtual function started working as expected. I seems like the compiler recognized what was virtual and what was nonvirtual, but the bytcode interpreter treated everything as nonvirtual if it was found in a zip.

      Comment


        #4
        Thanks for letting me know. However the non-working scenario unfortunately I'm still not following the problem scenario but if you got up and running then you should be good to go. (If you feel otherwise then let me know that as well )

        Thank You.

        -Brett
        BrettNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by quantera, Today, 05:38 PM
        0 responses
        3 views
        0 likes
        Last Post quantera  
        Started by ciro1963, Today, 03:58 PM
        0 responses
        2 views
        0 likes
        Last Post ciro1963  
        Started by swcooke, Today, 02:48 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by SOFI777, Today, 01:03 PM
        5 responses
        30 views
        0 likes
        Last Post SOFI777
        by SOFI777
         
        Started by Gerard111, 09-23-2015, 07:25 AM
        2 responses
        1,207 views
        0 likes
        Last Post NinjaTrader_ChristopherD  
        Working...
        X