Announcement

Collapse
No announcement yet.

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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      163 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      313 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      245 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      350 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      179 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X