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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      596 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      343 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
      556 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      554 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X