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 11-21-2011, 07:31 AM   #1
claudio_thomas
Junior Member
 
Join Date: Nov 2011
Posts: 1
Thanks: 0
Thanked 0 times in 0 posts
Default Higher timeframe displaying on lower timeframe

Hi,

as I come from mql, I wonder how to program an indicator in a way that, say I want to display 5 min indicator on 1 min timeframe, the value of the higher timeframe bar is the same on all lower timeframe bars belonging to the higher timeframe, i.e. 5x 1min bars in one 5min bar.

Right now with the attached code, the indicator is only displayed correctly at calling but from that time on, each bar is drawn differently instead of changing all lower timeframe bars belonging to the higher timeframe.

So, in short, it seems to be a displaying problem as the right value is called. Any suggestions highly appreciated.


if (CurrentBars[0] <= BarsRequired || CurrentBars[1] <= BarsRequired) return;

if (BarsInProgress == 0)
{
//call the data from another indicator
UP.Set(B2CForceIndexSlope(BarsArray[1],period).UP[0]);
DOWN.Set(B2CForceIndexSlope(BarsArray[1],period).DOWN[0]);
}
claudio_thomas is offline  
Reply With Quote
Old 11-21-2011, 07:55 AM   #2
NinjaTrader_AdamP
NinjaTrader Customer Service
 
NinjaTrader_AdamP's Avatar
 
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
Default

claudio_thomas,

If you could send this indicator along with the B2CForceIndexSlope indicator it would be helpful in solving your issue. If you don't want anyone getting this code from the forum you can send it to Support at Ninjatrader dot com with ATTN : Adam in the message body. We don't publish our users code.

Right now I don't see anything wrong with your code.
NinjaTrader_AdamP 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
Checking higher timeframe moving average kylie Strategy Development 2 01-17-2011 05:41 PM
Multi-timeframe strategy skips lower timeframe bars at one point adamus Version 7 Beta General Questions & Bug Reports 13 07-03-2010 01:36 AM
global draw object getting changed in lower timeframe chart mmtrader Version 7 Beta General Questions & Bug Reports 3 04-20-2010 08:27 AM
Overlay higher timeframe jtrade Indicator Development 3 06-19-2009 03:21 AM
How to get higher timeframe data to make entry decision at lower timeframe? cunparis Strategy Development 1 03-11-2009 12:41 PM


All times are GMT -6. The time now is 04:26 PM.