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 > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 05-25-2011, 02:00 PM   #1
malej.gregy
Junior Member
 
Join Date: Apr 2011
Posts: 15
Thanks: 2
Thanked 0 times in 0 posts
Default Cross Above

Hi,

can someone help me with an easy compilation error?
I have an additional serie in my code. Why this condition cannot be compiled?

if(CrossAbove(Closes[1][0],900,5))

It should be true, if the close of the second serie is higher than 900. However, I cant get this compiled.

Thanks
malej.gregy is offline  
Reply With Quote
Old 05-25-2011, 02:05 PM   #2
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hello malej.gregy,

The first input is expecting a series, and you can do this by removing the second bracket of Closes:

if(CrossAbove(Closes[1], 900, 5))
NinjaTrader_RyanM 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
EMA cross mateo321 Strategy Development 41 05-19-2011 07:37 AM
Price at Cross Above / Cross Below sgordet Indicator Development 7 01-11-2011 02:58 PM
Cross Above / Cross Below for NT7? Elliott Wave Market Analyzer 12 11-20-2010 05:27 PM
what the difference between global cross hair and cross hair? hanzahar Miscellaneous Support 3 12-16-2008 07:36 AM
MACD Cross suitguy1 ATM Strategies (Discretionary Trading) 1 08-04-2008 07:38 AM


All times are GMT -6. The time now is 06:05 AM.