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 CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      213 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      126 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      145 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      229 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      190 views
      0 likes
      Last Post CarlTrading  
      Working...
      X