Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Need Code Help for MA

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

    #16
    ...

    It is showing me the current price in the MA window, I need it show me a "1" for inside bar or a 0 for not an inside bar, his screen shot does that... don't know why it won't for me...

    Comment


      #17
      Hi tshirtdeal,

      Try restarting NinjaTrader and re-applying the indicator. You will see an error in the log tab.
      The following link describes the steps to resolve this error - http://www.ninjatrader.com/support/f...ead.php?t=3170
      TimNinjaTrader Customer Service

      Comment


        #18
        Thanks Tim

        learn something new everyday I guess, seems to be working, i got to learn this stuff better, that was so frustrating for me:

        anyway, this is what I did and seems to work... make sense to you?

        if(High[0] <= High[Math.Min(CurrentBar, 1)] && Low[0] >= Low[Math.Min(CurrentBar, 1)])

        {
        Plot0.Set(1);
        }
         
        else
        {
        Plot0.Set(0);
        }

        Comment


          #19
          Hi tshirtdeal,

          Yes, that should work for you, alternatively you can do...

          if (CurrentBar < 1)
          return;

          if(High[0] <= High[1] && Low[0] >= Low[1])
          TimNinjaTrader Customer Service

          Comment


            #20
            Thanks Tim

            Thanks for all the help Tim, was going borderline crazy on that!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Brevo, Today, 01:45 AM
            0 responses
            3 views
            0 likes
            Last Post Brevo
            by Brevo
             
            Started by aussugardefender, Today, 01:07 AM
            0 responses
            3 views
            0 likes
            Last Post aussugardefender  
            Started by pvincent, 06-23-2022, 12:53 PM
            14 responses
            239 views
            0 likes
            Last Post Nyman
            by Nyman
             
            Started by TraderG23, 12-08-2023, 07:56 AM
            9 responses
            384 views
            1 like
            Last Post Gavini
            by Gavini
             
            Started by oviejo, Today, 12:28 AM
            0 responses
            6 views
            0 likes
            Last Post oviejo
            by oviejo
             
            Working...
            X