Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy not printing

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

    Strategy not printing

    Why Strategy wont print bar color and background color?
    Thanks

    #2
    Hello quant007,

    Thank you for your post and welcome to the NinjaTrader Support Forum!

    What code are you using to print the bar color and background? Can you supply the lines of code using Print() for BarColor and BackColor?

    I look forward to your response.

    Comment


      #3
      <summary>
      /// This method is used to configure the strategy and is called once before any strategy method is called.
      /// </summary>
      protected override void Initialize()
      {

      CalculateOnBarClose = true;
      }

      /// <summary>
      /// Called on each bar update event (incoming tick)
      /// </summary>
      protected override void OnBarUpdate()
      {
      // Condition set 1
      if (Rising(RSI(14, 3).Avg) == true
      && Falling(RSI(14, 3).Avg) == true)
      {
      BarColor = Color.GreenYellow;
      BarColor = Color.Red;

      Comment


        #4
        Hello quant007,

        Thank you for your response.

        Are you looking for a Red or GreenYellow bar? Your code would try to set it to GreenYellow and then to Red.

        What color are you looking for when the condition returns true?

        I look forward to your response.

        Comment


          #5
          Also that condition would never be true.

          It needs split it and separated.

          Comment


            #6
            Originally posted by sledge View Post
            Also that condition would never be true.

            It needs split it and separated.
            What the heck do you mean? Of course anything can be both rising and falling at the same time. Oh, OK, maybe not price or its derivatives. Never mind.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            633 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            364 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            105 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            567 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            568 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X