Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Project EMA line forward

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

    Project EMA line forward

    Hi,
    I don't know if this is possible but I would like to be able to project the line of the EMA forward along it's current direction.I guess you could say, project it's current direction into the future.

    Thanks

    #2
    Originally posted by mlarocco View Post
    Hi,
    I don't know if this is possible but I would like to be able to project the line of the EMA forward along it's current direction.I guess you could say, project it's current direction into the future.

    Thanks
    Do you remember calculus from school? This is effectively the same as drawing a tangent to a curve.

    You need a previous time period to anchor your ray (which is the style you want, I think). You could use the previous bar, but this will be highly unstable. Anyway, if you go n bars back, this is your coding:

    Code:
    DrawRay("My ray" + CurrentBar, [B][I][COLOR="Blue"]n[/COLOR][/I][/B], EMA([I]Period[/I])[[B][I][COLOR="Blue"]n[/COLOR][/I][/B]], 0, EMA([I]Period[/I])[0], Color.Blue);

    Comment


      #3
      Hello,

      Thank you for the question.

      The plots would not be able to be projected past the current bar but you are able to use drawing tools with a negative bars ago to achieve a similar effect, this would include drawing dots or triangles or any of the drawing tools.

      You would need to create a indicator in order to do this, you would also need to create logic to determine what values the dots for example would be placed in the future bars.

      I do not know of anything existing that does this but potentially could be created

      please let me know if I may be of additional assistance.

      Comment


        #4
        Originally posted by mlarocco View Post
        Hi,
        I don't know if this is possible but I would like to be able to project the line of the EMA forward along it's current direction.I guess you could say, project it's current direction into the future.

        Thanks
        Feasible, It is a bit tricky to code the line that plots ahead. A correct solution would require a custom plot. Without a custom plot, you need to scroll the chart forward to be able to see the projection.

        Attached is a screenshot of a quick and dirty sample indicator that requires scrolling, Doing it correctly would take some more time.
        Attached Files

        Comment


          #5
          Thanks for the replies. Looks like I have some playing/testing to do.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          601 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          347 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          559 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          558 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X