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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      152 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      87 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      131 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      127 views
      1 like
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      106 views
      0 likes
      Last Post CarlTrading  
      Working...
      X