![]() |
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
|
|||||||
| Market Analyzer Support for the NinjaTrader Market Analyzer. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Dec 2010
Posts: 29
Thanks: 2
Thanked 1 time in 1 post
|
Hallo,
I have programmed the following code (is part of an indicator for signals for the MA): ... protected override void OnBarUpdate() { // Make sure there are enough bars. if (CurrentBar < 10) return; //ODR LONG: // Kurzfristige Trendausrichtung: if (EMA(10)[0] > EMA(10)[2] //Momentum Entwicklung: && Momentum(EMA(10), 10)[0] > 0 && Momentum(EMA(10), 10)[0] > Momentum(EMA(10), 10)[2] //Langfristige Trendausrichtung: && EMA(8)[0] > EMA(10)[0] && EMA(10)[0] > EMA(20)[0] && EMA(20)[0] > EMA(50)[0] && EMA(20)[0] > SMA(200)[0] && EMA(50)[0] > SMA(200)[0] // 2. SwingHigh - Pattern - Definition LONG: && CrossAbove(Close, Swing(5).SwingHigh, 1)) { Value.Set(1); } Problem: the indicator ignored the momentum code. Wehre ist the error? |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
|
Blackburn,
I am not seeing anything immediately obvious here. Could you describe what is happening here in a bit more detail?
Adam P.
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Dec 2010
Posts: 29
Thanks: 2
Thanked 1 time in 1 post
|
Hallo,
please see the attach files. One of the points is, the the MOM must <0; on the pictures you see that isn't so. I got a signal (value 1) in the MA. would it be possible that it is up to the settings in MA? - # of bars look back: 256 - calculate on bar close: false Blackburn |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Dec 2010
Posts: 29
Thanks: 2
Thanked 1 time in 1 post
|
MOM must be > 0
|
|
|
|
|
|
#5 |
|
NinjaTrader Customer Service
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
|
Hello,
Thanks for that information. Specifically the session template between market analyzer and chart need to match and also the numbers of days back loaded for indicators need to also match. Please right click on the market analyzer and select properties. Its there you can get access to the session template. Finally: right click columns on the market analyzer. Set the indicator column to load the same amount of days/bars back that the chart is loading. -Brett
Brett
NinjaTrader Customer Service |
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Dec 2010
Posts: 29
Thanks: 2
Thanked 1 time in 1 post
|
Hallo,
do you mean the - # of bars look back? The # of bars look back in the properties of the MA and for the indicator must have the same value; is this right? Blackburn |
|
|
|
|
|
#7 |
|
NinjaTrader Customer Service
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
|
Correct, this would need to be roughly the same amount of bars back you have in your chart for the same signal.
-Brett
Brett
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SPY Instrument definition | chobotnice | Connecting | 1 | 05-16-2012 02:23 AM |
| AvgPrice definition | arbuthnot | Strategy Development | 1 | 05-11-2012 02:36 AM |
| NT7 definition of CalculateOnBarClose | zeeee | Strategy Development | 9 | 08-05-2010 06:53 AM |
| Does anyone have a link to ZiNonLagMA definition? | crmcwi | Indicator Development | 3 | 09-22-2009 11:00 AM |
| Time Definition | binwang2 | General Programming | 1 | 05-13-2009 11:23 AM |