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-20-2009, 11:57 AM   #1
pmaglio
Senior Member
 
Join Date: Oct 2007
Location: Argentina
Posts: 175
Thanks: 2
Thanked 19 times in 14 posts
Send a message via Yahoo to pmaglio Send a message via Skype™ to pmaglio
Default How to get timeframe info from inside code

I need to know from inside my indicator which is the timeframe used in the chart ( 1 Min, 5 Min, etc ) to update some parameters.
Can someone tell me which variable should I look ?

Thanks....
pmaglio is offline  
Reply With Quote
Old 01-20-2009, 11:59 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

Please see: http://www.ninjatrader-support.com/H...V6/Period.html
NinjaTrader_Josh is offline  
Reply With Quote
Old 01-20-2009, 02:00 PM   #3
pmaglio
Senior Member
 
Join Date: Oct 2007
Location: Argentina
Posts: 175
Thanks: 2
Thanked 19 times in 14 posts
Send a message via Yahoo to pmaglio Send a message via Skype™ to pmaglio
Default

Quote:
Originally Posted by NinjaTrader_Josh View Post

When I compile this example I get an error in the red text

if (Bars.Period.Id == PeriodType.Tick && BarsPeriod.Value >= 100)

May be it should be Bars.Period.Value ?
pmaglio is offline  
Reply With Quote
Old 01-20-2009, 02:03 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

From an indicator you want to use Bars.Period.Value. That is correct.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Inside BAr PrTester NinjaScript File Sharing Discussion 25 12-04-2011 01:16 PM
Inside Bar Indicator ryebank Indicator Development 2 11-20-2008 02:06 PM
Inside Bar bsamani NinjaScript File Sharing Discussion 1 11-06-2008 12:38 PM
Putting larger timeframe indicator over a shorter timeframe chart brownsfan019 Charting 1 06-25-2008 03:52 PM
Look Inside Bar for Backtesting Laura47 Strategy Analyzer 1 02-10-2008 05:06 PM


All times are GMT -6. The time now is 08:47 PM.