![]() |
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Dec 2007
Posts: 314
Thanks: 0
Thanked 0 times in 0 posts
|
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);} } |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Print the values of your DataSeries as well as your indicator.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |