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

Two strategies sharing same methods

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

    Two strategies sharing same methods

    I have two strategies using the same methods eg. for file operations.

    What would be the best way in Ninja to create a FileOperations class that both strategies could use?

    Simple question in C#, but a lot harder in Ninja's C#, and I've reached the limit, where I do need to use separate classes.

    Thanks in advance.

    #2
    You could try it in the UserDefinedMethods.cs file.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Ok, so anyways, these methods will be the methods of Strategy class. So there is no way of creating and using separate classes.
      Although I guess I see the logic now.
      Thanks.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mestor, 03-10-2023, 01:50 AM
      14 responses
      375 views
      0 likes
      Last Post z.franck  
      Started by molecool, 10-09-2017, 10:48 AM
      5 responses
      1,621 views
      0 likes
      Last Post trader-ap  
      Started by The_Sec, Yesterday, 03:53 PM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by mmenigma, Yesterday, 03:25 PM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by kujista, Today, 05:44 AM
      0 responses
      7 views
      0 likes
      Last Post kujista
      by kujista
       
      Working...
      X