Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simple StochRSI Problem!

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

    Simple StochRSI Problem!

    Hey I'm having the craziest problem, but I know it has to be easy to fix. just can't do it.

    I'm just trying to get a Dot drawn when StochRSI goes overbought or Sold.

    Code:
    if(CrossBelow(StochRSI(14), OS, 1))
    			{ 
    				 DrawDot("My dot" + CurrentBar, false, 0, 0, Color.Blue);
    			}
    			
    			//If OverBought
    			if(CrossAbove(StochRSI(14), OB, 1))
    			{
    				 DrawDot("LongDot" + CurrentBar, false, 0, 0, Color.Red);
    			}
    I've attached the indicator. It DOESn't Work, I'm NOT getting errors, but I'm not getting drawings either. Please help.

    Thanks!!
    Attached Files

    #2
    Originally posted by ginx10k View Post
    Hey I'm having the craziest problem, but I know it has to be easy to fix. just can't do it.

    I'm just trying to get a Dot drawn when StochRSI goes overbought or Sold.

    Code:
    if(CrossBelow(StochRSI(14), OS, 1))
                { 
                     DrawDot("My dot" + CurrentBar, false, 0, 0, Color.Blue);
                }
                
                //If OverBought
                if(CrossAbove(StochRSI(14), OB, 1))
                {
                     DrawDot("LongDot" + CurrentBar, false, 0, 0, Color.Red);
                }
    I've attached the indicator. It DOESn't Work, I'm NOT getting errors, but I'm not getting drawings either. Please help.

    Thanks!!
    Your code draws the dot at a price level 0, which is beyond the bounds of the chart.

    If you wish to see the dots, draw them close to price, for example

    Code:
    DrawDot("LongDot" + CurrentBar, false, 0, Low[0] - 3 * TickSize, Color.Red);

    Comment


      #3
      Fixed

      Can't believe it was so simple. thanks harry. much appreciated

      Comment


        #4
        hi.
        i want to also create the indicator with the following snippet:
        **********
        //if OverSold
        if(CrossBelow(StochRSI(14), OS, 1))
        {
        DrawDot("ShortDot" + CurrentBar, false, Low[0], -3, Color.Magenta);
        }

        //If OverBought
        if(CrossAbove(StochRSI(14), OB, 1))
        {
        DrawDot("LongDot" + CurrentBar, false, 0, Low[0] - 3 * TickSize, Color.Magenta);
        }


        ************
        but when I copy paste it into a wizard created indicator it creates all kinds of errors. What is the code of a basic Template- and where do i copy the snippet?
        any help would be awesome!

        Comment


          #5
          Please post the entire indicator that creates the problem. If you just post a snippet, nobody can help you.

          For example if you declare variables "oB" and "oS" in the variables section, and then call "OB" and "OS" in OnBarUpdate(), the indicator cannot work, because C# is case sensitive.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          574 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          332 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          553 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          551 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X