Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ray Problem

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

    Ray Problem

    I am using the code below to draw a ray on the price chart when a certain condition is met. The intent is for the ray to be drawn only from the latest occurrence. However, the ray is showing up only once, at a prior occurrence, in a seemingly random choice of occurrences. Can't figure this out.

    if ((RSI(2,1)[2] < 20) && (RSI(2,1)[1] < RSI(2,1)[2]) && (Close[0] > Close[1]))
    {
    DrawRay("Tag1",8,Close[0],0,Close[0],Color.Yellow,DashStyle.Dash,3);

    }


    Another approach would be to draw a ray from, say, 8 bars back and end it a certain number of bars forward, but I can't figure out how to do that either. If so, I could draw multiple bars, one for each occurrence by changing the Tag1 name.
    Last edited by Richard Von; 02-02-2010, 11:04 AM.

    #2
    Richard, correct in your code case the ray would be drawn the last time the condition evaluated to true to get a history of ray's, please a unique tag id for each.



    Unfortunately you can't plot programmatically into the future.

    Comment


      #3
      Thanks for the reply. I thought I had the problem is that the ray is NOT being drawn at the last occurrence. But may have a problem with the condition code. Working on it.

      I appreciate the help.
      Last edited by Richard Von; 02-02-2010, 12:54 PM.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      160 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      307 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      244 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      348 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      178 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X