Looking at it again it actually looks like Add("ABC", PeriodType.Day,3); & Lows[1][0] is giving the low from 4 days back?
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!
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
NinjaTrader
Lowest low..3day
Collapse
X
-
Lowest low..3day
How would I go about getting the lowest low of the previous 3 days? I was trying to use Add("ABC", PeriodType.Day,3); and use Lows[1][0] but that apparently gives the value for 3 days back instead of the whole 3day period.
Looking at it again it actually looks like Add("ABC", PeriodType.Day,3); & Lows[1][0] is giving the low from 4 days back?Last edited by zachj; 12-24-2013, 08:17 AM.Tags: None
-
Hi Zachj,
Thank you for your post.
You may want to look into using LowestBar() function to get the lowest price over a specified look back period -
http://www.ninjatrader.com/support/h...?lowestbar.htm
Additionally, you would want to use one day instead of three and use try this code -
Code:LowestBar(Lows[1], 3);
Cal H.NinjaTrader Customer Service
-
Zachj,
Lows is used for the BarsArray collection to access the particular Data Series.
In this case Lows[1] will use the first Data Series that you have added to the script.
Index [0] will always be the primary Data Series.
http://www.ninjatrader.com/support/h....html?lows.htmCal H.NinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_Cal View PostHi Zachj,
Thank you for your post.
You may want to look into using LowestBar() function to get the lowest price over a specified look back period -
Additionally, you would want to use one day instead of three and use try this code -
Code:LowestBar(Lows[1], 3);
This isn't giving the price though, it's giving the # of bars back? I see it in the print output, it show 1, 2 or 3 not a price.
Comment
-
Zachj,
I do apologize, that is indeed correct.
You will need to use MIN(Lows[1], 3); That will return the lowest price from 3 bars ago.
http://www.ninjatrader.com/support/h...inimum_min.htmCal H.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by rocketman7, Today, 02:12 AM
|
7 responses
31 views
0 likes
|
Last Post Today, 09:23 AM | ||
Started by guillembm, Yesterday, 11:25 AM
|
3 responses
16 views
0 likes
|
Last Post Today, 09:11 AM | ||
Started by junkone, 04-21-2024, 07:17 AM
|
10 responses
149 views
0 likes
|
Last Post Today, 09:03 AM | ||
Started by tsantospinto, 04-12-2024, 07:04 PM
|
6 responses
101 views
0 likes
|
Last Post
by tsantospinto
Today, 08:57 AM
|
||
Started by trilliantrader, 04-18-2024, 08:16 AM
|
7 responses
28 views
0 likes
|
Last Post Today, 07:56 AM |
Comment