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

lowest low

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

    lowest low

    I am trying to determine if the prior bar is the lowest low of 5 bars back.

    Here is my code:
    Low[0
    ] > MIN(Low, 5)[1]

    where am I going wrong?
    Last edited by velocity; 03-10-2009, 05:39 AM.

    #2
    Hi velocity, what issue are you getting with this code? If no plot is displaying you might have run into this - http://www.ninjatrader-support2.com/...ead.php?t=3170
    BertrandNinjaTrader Customer Service

    Comment


      #3
      i have
      if
      (CurrentBar < 10)
      return;

      so that is not the problem. Just trying to determine if the prior bar is the lowest low of 5 bars back.

      any thoughts?

      Comment


        #4
        You want then to check for equality, not if it's greater, so you could try this -
        Code:
        [SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2] (Low[[/SIZE][/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2]] == MIN(Low, [/SIZE][/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]5[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2])[[/SIZE][/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2]])
        DrawArrowUp(CurrentBar.ToString(), [/SIZE][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]true[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2], [/SIZE][/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2], Low[[/SIZE][/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2]] - TickSize,Color.Blue); [/SIZE][/SIZE]
        [SIZE=2][SIZE=2][/SIZE][/SIZE]

        BertrandNinjaTrader Customer Service

        Comment


          #5
          got it. thanks

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by geddyisodin, Yesterday, 05:20 AM
          8 responses
          51 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by cmtjoancolmenero, Yesterday, 03:58 PM
          10 responses
          36 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by DayTradingDEMON, Today, 09:28 AM
          4 responses
          24 views
          0 likes
          Last Post DayTradingDEMON  
          Started by George21, Today, 10:07 AM
          1 response
          16 views
          0 likes
          Last Post NinjaTrader_ChristopherJ  
          Started by Stanfillirenfro, Today, 07:23 AM
          9 responses
          25 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X