NinjaTrader Support Forum  
X

Attention!

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


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 08-20-2007, 07:10 PM   #1
TickJob
Junior Member
 
Join Date: May 2007
Posts: 9
Thanks: 0
Thanked 0 times in 0 posts
Default How to program Higher-High Higher-Low

How to program to identify HH (Higher High) or LL (Lower Low) or LH (Lower High) or Higher Low( HL) above and below each Peak as shown in below chart?
Attached Images
File Type: gif zigzag1.png (25.3 KB, 159 views)
TickJob is offline  
Reply With Quote
Old 08-20-2007, 07:14 PM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

Hi TickJob,

I am unsure at what level of programmer you are but you can start with our Indicator Development tutorials located in our help guide under the NinjaScript section. This will give you a foundation for programming indicators in NinjaTrader.

Checking for higher highs can be done like:

Code:
if (High[0] > High[1])
    Print("We have a higher high");

if (Low[0] < Low[1])
    Print("We have a lower low");
NinjaTrader_Ray is offline  
Reply With Quote
Old 08-20-2007, 08:37 PM   #3
TickJob
Junior Member
 
Join Date: May 2007
Posts: 9
Thanks: 0
Thanked 0 times in 0 posts
Default

Hi Ray,

Thanks for your reply. I have some knowledge on C#.
with reference to my chart, I am looking for the "peak" form by many bars, not next bar higher or lower.
TickJob is offline  
Reply With Quote
Old 08-21-2007, 06:47 AM   #4
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

The Swing indicator will give you values for the most recent peaks and troughs. It will give you a value representing bars ago for most recent swing points.

Additional reference information is located here - http://www.ninjatrader-support.com/H...eToNinjaTrader
NinjaTrader_Ray is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
High greater than Highest High of last 20 Bars SamIam Strategy Development 1 08-19-2007 04:58 PM
1st Hour High/Low pijamatrader Indicator Development 42 07-16-2007 05:31 PM
Setting EntryHandling || EntriesPerDirection From Program Overridden by BackTest Parameters KBJ Strategy Analyzer 4 05-01-2007 07:24 AM
First program Problem Freddie Indicator Development 5 03-25-2007 09:51 AM
only 1 dome with higher default order qty? dandxg Miscellaneous Support 2 10-23-2006 02:06 PM


All times are GMT -6. The time now is 09:19 PM.