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 SmartArtsStudio, Yesterday, 09:41 PM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_Jason  
            Started by Lumbeezl, Today, 01:20 AM
            0 responses
            4 views
            0 likes
            Last Post Lumbeezl  
            Started by fawzanalim, Yesterday, 05:59 PM
            1 response
            15 views
            0 likes
            Last Post NinjaTrader_Jason  
            Started by JuanPabloQuevedo, Yesterday, 05:27 PM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_Jason  
            Started by StevenNelson, Yesterday, 03:24 PM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_Jason  
            Working...
            X