Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator Not Drawing Line

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

    Indicator Not Drawing Line

    Hello,

    I'm learning NinjaScript and C#. I'm creating a couple of indicators to help with that.

    But I cannot get the alert indicator I'm working on to draw a LimeGreen horizontal line, when the RSI is greater than 50, or to draw a DeepPink horizontal line, when the RSI is less than 45.

    I named the tag for the LimeGreen horizontal line, tag100 and named the tag for the DeepPink horizontal line, tag200

    And when I go into the Drawing Tools > Drawing Objects, it does show that both a LimeGreen and DeepPink horizontal line were drawn on the chart, but they are not on my chart.

    The screenshots attached will show the code I used and the Drawing Tools > Drawing Objects that are shown to have been drawn.

    Please advise on how to get the horizontal lines to draw

    Thanks,
    Attached Files

    #2
    Hello i2w8am9ii2,

    Thanks for your post.

    The code and draw object data shows that the lines are being drawn at the price level of 1000, do you see a line at that price level on your chart?

    Comment


      #3
      Hi Paul,

      Thanks for your reply to my post.

      I am testing this indicator out on the CL instrument and so the price range that I see on my chart is from 68.64 to 69.04

      Screenshot attached.

      Is there a way to tell the indicator to draw the horizontal line a few ticks below the current price bar if the RSI is above 50, and to draw the line a few ticks above the current price bar if the RSI is below 45?
      Attached Files

      Comment


        #4
        Hello i2w8am9ii2,

        Thanks for your reply.

        In place of , 1000, you could use , Close[0] + 4 * TickSize,

        Comment


          #5
          Hi Paul,

          Thanks so much for the help, it worked. Screenshot attached.

          Ninjatrader 8 is a really great trading platform. I have no problems at all with it now. You folks worked out all the kinks. Great programmers. The platform is awesome.

          And the support at Ninjatrader is really great too.

          Thanks again,
          Attached Files

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          646 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          367 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          107 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          569 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          573 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X