Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Drawing Arrow needs reset

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

    Drawing Arrow needs reset

    hi

    I know it is something simple but i just cant put my finger on it

    I took a regular RSI and want to draw arrows under or above the bar if RSI above or below 30-70

    That is working however since i run the indi live and not on bar close the Arrows get drawed during the bar and dont reset if the bar goes the other way. I use Range bars

    Here is the code of the drawing section which is at the bottom of the RSI script

    Thank you in advance



    if(rsi > 70)
    {
    DrawTriangleUp(CurrentBar.ToString(),
    true, 0, Low[0]-TickSize, Color.Green);
    }
    if(rsi < 30)
    {
    DrawTriangleDown(CurrentBar.ToString(),
    true, 0, High[0]+TickSize, Color.Red);
    }


    #2
    Hello richbois,
    If the condition doesnt holds true then you have to explicitly remove the draw objects from the chart by calling the RemoveDrawObject function. Please refer to our help guide to know more
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      I knew it was something simple for an expert like you

      Thank you for your help

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by pkefal, 04-11-2024, 07:39 AM
      11 responses
      36 views
      0 likes
      Last Post jeronymite  
      Started by bill2023, Yesterday, 08:51 AM
      8 responses
      43 views
      0 likes
      Last Post bill2023  
      Started by yertle, Today, 08:38 AM
      6 responses
      25 views
      0 likes
      Last Post ryjoga
      by ryjoga
       
      Started by algospoke, Yesterday, 06:40 PM
      2 responses
      24 views
      0 likes
      Last Post algospoke  
      Started by ghoul, Today, 06:02 PM
      3 responses
      16 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Working...
      X