NinjaTrader Support Forum  

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 01-15-2008, 10:18 AM   #1
Burga1
Senior Member
 
Join Date: Nov 2007
Posts: 388
Thanks: 0
Thanked 0 times in 0 posts
Default How to ID the bumps?

Hi,

I'm looking for some advice on how to best accomplish this. Using the attached screenshot I simply want to be able to identify the existence of the "bump" between the points labeled A and B (where the red dot is). Comparing that to points C and D, where there is no "bump" but rather a straight upwards/downwards line between the points.

Basically I want to be able to determine if the line between the two points is "straight" or has been interrupted by a bump formation...I've played around with MRO and MAX/MIN but am having some difficulty...thanks in advance.
Attached Images
File Type: jpg screen1.JPG (13.7 KB, 42 views)
Burga1 is offline  
Reply With Quote
Old 01-16-2008, 01:14 AM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

You may want to look into Rising() and Falling(). If it is falling the whole way between pt A and pt B then there is no bump.
NinjaTrader_Josh is offline  
Reply With Quote
Old 01-16-2008, 10:57 AM   #3
Burga1
Senior Member
 
Join Date: Nov 2007
Posts: 388
Thanks: 0
Thanked 0 times in 0 posts
Default

OK, thanks. So I guess I'd have to get the # of bars between the points and then run some sort of routine to check the rising/falling for each of those points then...
Burga1 is offline  
Reply With Quote
Old 01-16-2008, 11:22 PM   #4
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

A loop should work nicely for you.
NinjaTrader_Josh 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


All times are GMT -6. The time now is 06:02 AM.