NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 05-18-2009, 12:54 PM   #1
velocity
Senior Member
 
Join Date: Dec 2007
Posts: 314
Thanks: 0
Thanked 0 times in 0 posts
Default data series

I am trying to get an Arrow to print when making the ehlersinewave indicator a data series. I can get the Arrows to print when I call it on the current bar, i.e. EhlerSine_data[0] > 0 but when I change the code to pick up the prior bar EhlerSine_data[1] > 0 I do not get any arrows. I am stumped on this because I have done similar code just like this with no problem. Any thoughts?


publicclass TriggerSine : Indicator
{
#region Variables

private DataSeries EhlerSine_data;

#endregion

///</summary>
protectedoverridevoid Initialize()

EhlerSine_data = new DataSeries(this);

/// Called on each bar update event (incoming tick)
///</summary>
protectedoverridevoid OnBarUpdate()
{
if (CurrentBar < 10)
return;

// Here I am loading the data in the new custom data series


EhlerSine_data.Set(EhlersSineWave.LeadSine[0]);

///// condition statement /////

if ( EhlerSine_data[0] > 0 )
{DrawArrowUp("MyArrowUp1"+CurrentBar, 0, Low[0] - TickSize, Color.Green);}

}
velocity is offline  
Reply With Quote
Old 05-18-2009, 01:09 PM   #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

Print the values of your DataSeries as well as your indicator.
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
Replay data feed: Last Date on Format Data Series Dialogue atrader101 Miscellaneous Support 1 04-20-2009 05:14 PM
Add daily series to minute series binwang2 General Programming 4 04-06-2009 08:56 AM
New Data Series nigeleyre Strategy Development 1 01-23-2009 03:45 PM
Data Series nigeleyre Strategy Development 3 01-07-2009 02:33 PM
data series argito Indicator Development 3 05-30-2008 11:06 PM


All times are GMT -6. The time now is 05:17 PM.