• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

% Grid Line

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

    % Grid Line

    I would like to have a line at a specific location in the indicator window. For example at the 80% Grid level. Is this possible?

    #2
    If you use any of the provided Draw() methods, you must put in an absolute y value. Provided that the indicator was showing a value of 0 through 100 (such as stochastics) then you would just put in a value of 80 for the y value parameter in a Draw() method.

    If you want to draw a line at 80% level in reference to the overall drawing space (pixels) this can be done by overriding the Plot() method. Doing this is advanced and requires some understanding of the .NET graphics class. You can see the CustomPlotSample indicator for reference.
    RayNinjaTrader Customer Service

    Comment


      #3
      Fair enough.

      I would like to plot on the "Zero Line" a changing line. When the Regression Channel is rising I would like to plot a "Green" Line, when the Regression Line is falling I would like to plot a "Red" Line. I'm having problems implementing this. I've attached a the indicator so you could see what I'm trying to do.

      edit: That's a bad example, as I don't have the zero line changing colors. But I think you get the idea.
      Attached Files

      Comment


        #4
        Would just having the zero line dynamically change color be sufficient? If yes, just do something like:

        if (rising)
        Lines[0].Pen.Color = Color.Green;
        else
        Lines[0].Pen.Color = Color.Red;

        Where [0] references the index where the zero line resides in the Lines collection. If you only have one line in the indicator, it would be index 0.
        RayNinjaTrader Customer Service

        Comment


          #5
          Thanks Ray for your help. I wish I was better at this stuff.

          Comment


            #6
            I think I'm getting close -- but I still can't seem to get it. My indicator is very similar to Woodies CCI that's why I was asking to see the code, it would have helped immensely.
            Attached Files
            Last edited by AO76; 07-07-2007, 03:58 PM.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Hanstanz, Today, 04:44 AM
            1 response
            16 views
            0 likes
            Last Post NinjaTrader_ChrisL  
            Started by Newtrader101, Today, 10:31 AM
            0 responses
            5 views
            0 likes
            Last Post Newtrader101  
            Started by rwilliam, Yesterday, 03:55 PM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_ChrisL  
            Started by RandanAL, Today, 09:05 AM
            0 responses
            4 views
            0 likes
            Last Post RandanAL  
            Started by cstern71, 09-02-2019, 10:30 AM
            4 responses
            65 views
            0 likes
            Last Post Lancer
            by Lancer
             
            Working...
            X