Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

changing a ray

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

    changing a ray

    Support/Josh,

    In NT 7, is there anyway to change partial color of a manually drawn ray ? Like color of the ray be changed from 2nd point onwards or based on a user condition.

    Also can a ray be drawn equivalently by a plot?

    --
    Achiever

    #2
    There is no gradiet color option if I understand your question correctly. Can you elaborate on what you mean by "ray draw equivalently by a plot".
    RayNinjaTrader Customer Service

    Comment


      #3
      Thanks Ray for your reply.

      By changing color of a ray, I mean, say like ray(which is completely colored red initially) starts from point A to B and then to C and beyond. If a user condition triggers, can the color of the ray from point B to C and beyond be changed to green color? So, that A to B, it is still old red color and from B onwards it be green color.

      If the "ray drawobject" color cannot be dynamically changed from point B onwards,..can the ray be drawn as a plot instead of a draw object, so that its color be controlled in the ninja script and be changed dynamically based on user condition.

      --
      Achiever
      Last edited by achiever; 04-19-2010, 12:06 PM.

      Comment


        #4
        Ray/Josh,

        Can you please reply on earlier post.

        Thanks
        Achiever

        Comment


          #5
          Originally posted by achiever View Post
          Thanks Ray for your reply.

          By changing color of a ray, I mean, say like ray(which is completely colored red initially) starts from point A to B and then to C and beyond. If a user condition triggers, can the color of the ray from point B to C and beyond be changed to green color? So, that A to B, it is still old red color and from B onwards it be green color.
          Thanks for clarification. No this is not possible.

          Originally posted by achiever View Post
          If the "ray drawobject" color cannot be dynamically changed from point B onwards,..can the ray be drawn as a plot instead of a draw object, so that its color be controlled in the ninja script and be changed dynamically based on user condition.

          --
          Achiever
          Yes this can be done using a Line for PlotStyle. Or, you could draw a Line for point A to B and then draw a Ray from B to inifinity for the second color.
          RayNinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_Ray View Post


            Yes this can be done using a Line for PlotStyle.
            Thanks Ray for clarifying. Using PlotStyle.Line, can the plot be defined in a way to follow the ray (using point A and point B )? or the logic of the line's Y value ( y = mx + c) has to be calculated to know where to plot?

            Originally posted by NinjaTrader_Ray View Post
            Or, you could draw a Line for point A to B and then draw a Ray from B to inifinity for the second color.
            In this alternate case of using a line from A to B and then a ray from B to infinity, for drawing a ray from point B to infinity, anyway to draw such a ray in NT as one doesn't know the a 2nd point on the ray like Point C and NT 7 needs 2 points for drawing a ray?

            Thank you
            Achiever

            Comment


              #7
              You would have to calculate the plots for each bar..come to think of it, this might be difficult since you likely not get a straight line.

              You would need to know a point C. You could calculate this by just calculate slope of the first line and projecting out. There is an example of this in the AutoTrendLine indicator I posted in the NinjaScript File Sharing. It calculates a trendline and then calculates the slope, projects into the future to determine if price penetrated this trendline etc...
              RayNinjaTrader Customer Service

              Comment


                #8
                Thank you Ray. Will look into the trendline indicator.

                --
                Achiever

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by CarlTrading, 03-31-2026, 09:41 PM
                1 response
                82 views
                1 like
                Last Post NinjaTrader_ChelseaB  
                Started by CarlTrading, 04-01-2026, 02:41 AM
                0 responses
                43 views
                0 likes
                Last Post CarlTrading  
                Started by CaptainJack, 03-31-2026, 11:44 PM
                0 responses
                64 views
                2 likes
                Last Post CaptainJack  
                Started by CarlTrading, 03-30-2026, 11:51 AM
                0 responses
                68 views
                0 likes
                Last Post CarlTrading  
                Started by CarlTrading, 03-30-2026, 11:48 AM
                0 responses
                56 views
                0 likes
                Last Post CarlTrading  
                Working...
                X