![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Jan 2008
Posts: 71
Thanks: 0
Thanked 0 times in 0 posts
|
Hello, I'm basically building off of Ninjas Swing High/Low indicator here and was wondering how to reference that highest high bar or lowest low bars info. I would actually like to get the range of the highest high bar and do some calculations from that. I would also like to reference the bar after that swing low to get it's range as well.
In the attach pic the arrows show the bars to which I'd like to reference. And like the swing high/Low, after a new one is formed, start referencing that new one. I'm pretty new to Ninja programming coming over from TS. Sorry if this is a really basic inquiry. |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,382
Thanks: 252
Thanked 967 times in 950 posts
|
Hi jjthetrader, the swing indicator gives you two methods to work with -
1. access how many bars ago the swing point occured with SwingHighBar / SwingLowBar or 2. access the current swing value with SwingHigh / SwingLow An example call and the needed syntax can be found here - http://www.ninjatrader-support.com/H...eV6/Swing.html
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Jan 2008
Posts: 71
Thanks: 0
Thanked 0 times in 0 posts
|
Should this condition work to only print if the current hugh is greater than the high of the last 4 bars?
if (High[0] > (MAX(High,4)[0])) DrawDiamond( "Buy",false, 0, High[0] + TickSize, Color.ForestGreen); Regarding my drawing of the diamond, is there any way to set the size. I may have the wrong input in the initialize section?: Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Dot, "Buy")); thanks
Last edited by jjthetrader; 05-14-2009 at 12:15 PM.
|
|
|
|
|
|
#4 | |
|
Certified NinjaScript Consultant
|
Quote:
if (High[0] > (MAX(High,4)[1])) |
|
|
|
|
|
|
#5 |
|
Member
Join Date: Jan 2008
Posts: 71
Thanks: 0
Thanked 0 times in 0 posts
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| alert on Highest High in 7 bars | rakeshSharma | Miscellaneous Support | 13 | 04-22-2009 07:08 AM |
| Retrieving Highest High for today | 1reason | Indicator Development | 1 | 01-12-2008 01:59 PM |
| Highest High in a LookBack Period | daven | Indicator Development | 2 | 09-28-2007 12:39 PM |
| Highest high of a time frame | pablo_lasuncion | Strategy Development | 5 | 09-04-2007 02:05 PM |
| High greater than Highest High of last 20 Bars | SamIam | Strategy Development | 1 | 08-19-2007 04:58 PM |