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 10-27-2008, 06:32 AM   #1
Mindset
Senior Member
 
Join Date: Mar 2008
Location: UK West Sussex
Posts: 693
Thanks: 18
Thanked 19 times in 14 posts
Default Ray - SampleGetHighLowBytimeRange

Your code seems to omit the first bar of the session

The following amendment seems to capture it

Code:
 	// 
double highestHigh = MAX(High, startBarsAgo  -  endBarsAgo)[endBarsAgo+1];
			
			
double lowestLow = MIN(Low, startBarsAgo -  endBarsAgo)[endBarsAgo+1];
Mindset is offline  
Reply With Quote
Old 10-27-2008, 09:21 AM   #2
NinjaTrader_Ben
NinjaTrader Customer Service
 
NinjaTrader_Ben's Avatar
 
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 4 times in 4 posts
Default

Hello,


Thank you for your post. We will look into this.
NinjaTrader_Ben is offline  
Reply With Quote
Old 10-27-2008, 01:28 PM   #3
NinjaTrader_Ben
NinjaTrader Customer Service
 
NinjaTrader_Ben's Avatar
 
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 4 times in 4 posts
Default

Hello,


Are you referring to the last bar of the session or the first bar? Can you post a screen shot of what you are talking about? I added "+1" as indicated below and I did not notice any difference. Can you provide steps I can take to reproduce what you are seeing?
NinjaTrader_Ben is offline  
Reply With Quote
Old 10-27-2008, 02:46 PM   #4
Mindset
Senior Member
 
Join Date: Mar 2008
Location: UK West Sussex
Posts: 693
Thanks: 18
Thanked 19 times in 14 posts
Default screen shot

Yes - here is a screen shot of today.
I am unable to put "0" ie zero into the input - it automatically converts it to "1". Hence, I think, the problem.
Chart is a 5 min chart of the dax Dec contract.
Attached Images
File Type: jpg incorrect data.jpg (61.3 KB, 244 views)
Last edited by Mindset; 10-27-2008 at 02:50 PM.
Mindset is offline  
Reply With Quote
Old 10-27-2008, 04:19 PM   #5
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,460
Thanks: 1
Thanked 172 times in 82 posts
Default

Does this version work for you?
Attached Files
File Type: zip SampleGetHighLowByTimeRange.zip (5.5 KB, 101 views)
NinjaTrader_Josh is offline  
Reply With Quote
Old 10-28-2008, 01:28 AM   #6
Mindset
Senior Member
 
Join Date: Mar 2008
Location: UK West Sussex
Posts: 693
Thanks: 18
Thanked 19 times in 14 posts
Default Fine

That works fine Josh - should have thought of that solution myself.
Mindset is offline  
Reply With Quote
Old 10-28-2008, 07:59 PM   #7
Joshua 1:8
Member
 
Join Date: Feb 2008
Location: Michigan-USA
Posts: 51
Thanks: 11
Thanked 3 times in 3 posts
Post

NinjaTrader_Josh / Mindset,

I have been looking all over the forum and trying to create an indicator like this. Can you please let me know how this is created? I have no programing experience. I did upload the script from Ninjatrader_Josh, however, I would like to have a horizontal line go further across the chart and cound not do so. Ive tried to "write" my own but as i said, I have no programming experience and I'm finding that I'm spending too much time to automatically draw two lines!!

Please Help!

Thanks!
Joshua 1:8 is offline  
Reply With Quote
Old 10-29-2008, 08:08 AM   #8
NinjaTrader_Ben
NinjaTrader Customer Service
 
NinjaTrader_Ben's Avatar
 
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 4 times in 4 posts
Default

Hello,

This will take programming, as you suspect. We will help with specific implementation questions but we cannot program it for you.

I suggest contacting our 3rd party NinjaScript Consultants here:
http://www.ninjatrader.com/webnew/pa...injaScript.htm

Or attempt it yourself and post your specific questions.
NinjaTrader_Ben is offline  
Reply With Quote
Old 12-11-2008, 12:04 PM   #9
bamazu
Junior Member
 
Join Date: Oct 2007
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
Thumbs up MidPoint please ?

Quote:
Originally Posted by NinjaTrader_Josh View Post
Does this version work for you?
Hi Josh..

I was wondering if a midpoint could be added to plot between the high and the low of the first hour.
This is a very useful on Ninja thanks for providing it.
bamazu is offline  
Reply With Quote
Old 12-11-2008, 12:15 PM   #10
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,460
Thanks: 1
Thanked 172 times in 82 posts
Default

See attachment.
Attached Files
File Type: zip SampleGetHighLowByTimeRange.zip (5.5 KB, 117 views)
NinjaTrader_Josh is offline  
Reply With Quote
Old 12-11-2008, 12:21 PM   #11
bamazu
Junior Member
 
Join Date: Oct 2007
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks Josh...that was quick
bamazu is offline  
Reply With Quote
Old 06-24-2009, 05:20 PM   #12
vast524
Senior Member
 
Join Date: Apr 2008
Posts: 132
Thanks: 0
Thanked 0 times in 0 posts
Default

I am wondering how the fib numbers are drawn automatically. I couldn't find any values when I opened it in the editor. I thought I would find set values in the script, but it seems as though it is using some predetermined value from somewhere.
I would like to change the values that it is using. Is there a way of doing this?
vast524 is offline  
Reply With Quote
Old 06-25-2009, 04:30 AM   #13
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 25,793
Thanks: 432
Thanked 1,689 times in 1,646 posts
Default

vast524, this script is not fib extension / retracement related, it determines and displays the high / low for a given timerange - http://www.ninjatrader-support2.com/...ead.php?t=8600
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 12-08-2009, 02:35 PM   #14
GreenTrade
Member
 
Join Date: Jan 2008
Posts: 97
Thanks: 0
Thanked 1 time in 1 post
Default

How would I change this so I can start the range the day before and use that in my calculations? Thanks!

GT
GreenTrade is offline  
Reply With Quote
Old 12-08-2009, 02:40 PM   #15
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,460
Thanks: 1
Thanked 172 times in 82 posts
Default

GreenTrade,

You need to first decide when you want to retrieve the information. Then you can loop through previous bars information and then get the information you need.
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 04:57 PM.

FULL RISK DISCLOSURE: Futures trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results. View Full Risk Disclosure.