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

Low price of n candles on x timeframe

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

    Low price of n candles on x timeframe

    Hello,

    Is there a simple method that I can use to calculate the Low Price for a n number of candles on a x timeframe?

    Example:

    What is the low of the previous 5 (n) candles on a 60 (x) minute timeframe?

    Thanks

    #2
    To illustrate:

    I tried to combine LowestBar() with BarArray[x] and Low() .. But I'm not really sure on how to combine them

    Comment


      #3
      This is what I try.. but I don't know how to finish it:

      Low(LowestBar(5))

      Meaning, I want to get the lowprice of the lowestbar of the last five 1-minute candles.

      Comment


        #4
        siroki,

        I am happy to assist you.

        For more information on LowestBar(), please see the following link : http://www.ninjatrader.com/support/h...?lowestbar.htm

        For more information on BarsArray, please see the following link :


        Essentially, you want to use LowestBar(BarsArray[0],5) I believe.

        Please let me know if I may assist further.
        Adam P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by siroki View Post
          This is what I try.. but I don't know how to finish it:

          Low(LowestBar(5))

          Meaning, I want to get the lowprice of the lowestbar of the last five 1-minute candles.
          Code:
          double desiredLow = Low[LowestBar(Low, 5)];
          or

          Code:
          double desiredLow = MIN(Low, 5)[0];

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by arvidvanstaey, Today, 02:19 PM
          4 responses
          11 views
          0 likes
          Last Post arvidvanstaey  
          Started by samish18, 04-17-2024, 08:57 AM
          16 responses
          60 views
          0 likes
          Last Post samish18  
          Started by jordanq2, Today, 03:10 PM
          2 responses
          9 views
          0 likes
          Last Post jordanq2  
          Started by traderqz, Today, 12:06 AM
          10 responses
          18 views
          0 likes
          Last Post traderqz  
          Started by algospoke, 04-17-2024, 06:40 PM
          5 responses
          47 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X