Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

modify @Strategy.cs

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

    modify @Strategy.cs

    Hi,

    I am developping some utilities for my strategies, and was in the obligation of declaring some static classes. To do so, I modify the @strategy.cs, but a lot of functions weren't disponible at this time (LOG, Print). The solution I found is very bad because I use too much the CPU. How can I do to make this functions work.

    Thank you in advance,
    R.E.

    #2
    Hello R.E.,

    Modifying the strategy base @Strategy.cs or any other system files that are present when NinjaTrader is installed is not supported by NinjaTrader to do.

    However, this thread will remain open for any community members that would like to assist you.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi,
      I understand this, but is it possible just to get an idea to create a static class that is accessible whenever we want (from every strategy) . Furthermore I want to use the NT methods (Print...). Is it possible without modifying your system files?

      Thank you in advance,
      R.E.

      Comment


        #4
        Hi R.E.,

        Yes, this is possible but not something I may assist with. Also, the optimizer cannot optimize static variables.

        I recommend taking a look at a few other forum threads for ideas.

        http://ninjatrader.com/support/forum....php?t=74030#9

        http://ninjatrader.com/support/forum....php?t=44101#4
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          I did my best but calling Print from the Strategy base seems to be a harder task that what I was thinking. Hope it will be easier in NT8.

          Thank you for your help anyway,
          R.E.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          56 views
          0 likes
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          143 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          160 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 05-10-2026, 08:12 PM
          0 responses
          96 views
          0 likes
          Last Post CarlTrading  
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          276 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Working...
          X