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 02-27-2012, 01:47 AM   #1
banyasz
Junior Member
 
Join Date: Feb 2012
Posts: 7
Thanks: 0
Thanked 0 times in 0 posts
Default Draw Line on different Timeframe

Hy , I am very new at Ninja Trader programming. I have developed an indicator , that can draw for me the inportant high low levels, and trend line. Unfortunatelly , when I change the time frame , the indicator shows still the daily High Low lines .
My question is what can be the problem?

I have tried to write a void thet can handle the timeframe , but I am not sure about it can be the key of my problem.


void period_changer()
{
if (BarsPeriod.Id == PeriodType.Minute){Add(PeriodType.Minute, 1);}
if (BarsPeriod.Id == PeriodType.Day){Add(PeriodType.Day, 1);}
}
banyasz is offline  
Reply With Quote
Old 02-27-2012, 01:57 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

banyasz, welcome to our forums here - I'm sure not I follow what you feel is not working correctly, what would you expect to happen if you change the timeframe? What calculation should change?

Dynamically adding a series would unfortunately not be supported, but you can add minute and daily and then refer to each BarsInProgress in your calcs as needed.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 02-27-2012, 02:29 AM   #3
banyasz
Junior Member
 
Join Date: Feb 2012
Posts: 7
Thanks: 0
Thanked 0 times in 0 posts
Default

I just only want from the indicator , is when i change the timeframe from Daily to 1 minute, draw the High Low levels to the Minute timeframe. I attache two pictures , the good one is working on daily timeframe.
And i wana to work the indicator on m1 TF. also.

banyasz is offline  
Reply With Quote
Old 02-27-2012, 02:33 AM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

Thanks, do you get any error shown in the log tab of the Control Center for the nonworking version?
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 02-27-2012, 02:41 AM   #5
banyasz
Junior Member
 
Join Date: Feb 2012
Posts: 7
Thanks: 0
Thanked 0 times in 0 posts
Default

Unfortunatelly there is no error message. I think when i chaneg timeframe , perhaps the indicator is still work on Daily chart.
banyasz is offline  
Reply With Quote
Old 02-27-2012, 03:31 AM   #6
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

banyasz, could you please email us at support at ninjatrader dot com with the script / code exported so we could give it a run here for you?
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 02-27-2012, 06:33 AM   #7
banyasz
Junior Member
 
Join Date: Feb 2012
Posts: 7
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks for the help I posted my script.
banyasz is offline  
Reply With Quote
Old 02-27-2012, 06:39 AM   #8
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

Quote:
Originally Posted by banyasz View Post
Thanks for the help I posted my script.
Thanks, did you sent it in to support? As I don't see it posted here in this thread (which is ok if you prefer to send it in directly to us).
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 02-27-2012, 11:30 AM   #9
banyasz
Junior Member
 
Join Date: Feb 2012
Posts: 7
Thanks: 0
Thanked 0 times in 0 posts
Default

I sent it to the support Thank you for the help!
banyasz 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
draw a line + sound alert when this line is crossed ? rem77 NinjaScript File Sharing Discussion 11 04-29-2013 07:43 PM
global draw object getting changed in lower timeframe chart mmtrader Version 7 Beta General Questions & Bug Reports 3 04-20-2010 08:27 AM
Multi timeframe line plots on all charts pip_gmt Indicator Development 2 03-02-2010 04:06 PM
Can draw dot, arrow, etc. but cannot draw line cunparis Strategy Development 10 03-21-2009 01:44 AM
how to draw a parallel line to a trend line? tradewiz Charting 4 12-19-2007 04:42 AM


All times are GMT -6. The time now is 12:43 PM.