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 sjsj2732, 03-23-2026, 04:31 AM
      0 responses
      42 views
      0 likes
      Last Post sjsj2732  
      Started by NullPointStrategies, 03-13-2026, 05:17 AM
      0 responses
      295 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      290 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      135 views
      1 like
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      98 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Working...
      X