Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to turn off MRO

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

    How to turn off MRO

    Hello,
    The title of my post is not exactly accurate. What I'm trying to do is print a dot every time my code is true. Instead I'm getting the most recent occurrence. Can someone look at my code to show me what I need to add? Thanks.
    Code:
    if (RSChannel(9, 1.5, 3, 14, 10).Mid[0] > VMAZones(9, 2, 18).Upper[0]
                    && RValueCharts(Color.Blue, 3, 5).VClose[0] > 4)
                {
                    DrawDot("Going Up", true, 0, High[0] + .5, Color.DarkGreen);
                }
       if (RSChannel(9, 1.5, 3, 14, 10).Mid[0] < VMAZones(9, 2, 18).Lower[0]
                    && RValueCharts(Color.Blue, 3, 5).VClose[0] < -4)
                {
                    DrawDot("Going Down", true, 0, Low[0] -.5, Color.DarkRed);
                }

    #2
    Hello CaptainAmericaXX,
    If you modify the code as shown below then are you getting the correct scenario.

    Code:
    DrawDot([B]"Going Up" + CurrentBar[/B], true, 0, High[0] + .5, Color.DarkGreen);
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      That did it. Thank you Joydeep. Can you explain why adding "Current Bar" to the string allows the dot to print on every occurance?

      Comment


        #4
        Hello CaptainAmericaXX,
        Each draw object are identifiable with a tag value. You were using a tag value ("Going Up") which is same for every bar and thus it was getting overwritten everytime the condition was true. Adding the "CurrentBar" to the tag value makes it unique for for each bar.

        Thus if your condition was true in bar 10 and bar 50, then the tag value will be appended as
        "Going Up10" and "Going Up50" which are unique and will not be overwritten.
        JoydeepNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

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