• 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

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, n, EMA(Period)[n], 0, EMA(Period)[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.
      JesseNinjaTrader Customer Service

      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 abfefmu, Today, 05:33 AM
          0 responses
          1 view
          0 likes
          Last Post abfefmu
          by abfefmu
           
          Started by bbdjad, Today, 04:36 AM
          0 responses
          4 views
          0 likes
          Last Post bbdjad
          by bbdjad
           
          Started by mittie3, Today, 03:33 AM
          0 responses
          7 views
          0 likes
          Last Post mittie3
          by mittie3
           
          Started by Againmain1, Today, 03:04 AM
          0 responses
          8 views
          0 likes
          Last Post Againmain1  
          Started by tonytimpa, Today, 01:33 AM
          0 responses
          5 views
          0 likes
          Last Post tonytimpa  
          Working...
          X