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 CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        29 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        21 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        184 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        338 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        262 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X