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 05-04-2008, 08:42 AM   #1
TAJTrades
Senior Member
 
Join Date: Dec 2007
Location: Atlanta
Posts: 281
Thanks: 0
Thanked 4 times in 3 posts
Default Multi Condition MRO

How can I create a multi Condition MRO?

Example:
I want to get the Bar Number for the Most Recent Occurence that StochasticsFast.D was below 20 AND Rising.

This does not work

int barsAgo = MRO(delegate {return StochasticsFast(3, 8).D < 20 && Rising( StochasticsFast(3, 8).D ) ;}, 1, 20);
TAJTrades is offline  
Reply With Quote
Old 05-04-2008, 01:12 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

See if this works
Code:
int barsAgo = MRO(delegate {return StochasticsFast(3, 8).D[0] < 20 && Rising(StochasticsFast(3, 8).D);}, 1, 20);
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
NinjaScript Condition Possible? jason83 General Programming 3 01-20-2008 06:41 PM
Multi Time Frame/Multi Instrument? GreenTrade Strategy Development 3 01-14-2008 02:24 PM
Condition Builder OUFan Strategy Development 6 12-19-2007 02:05 PM
Need help with a condition to check the angle of an MA NinjaTrader_Ray Strategy Development 2 06-08-2007 02:00 PM
Multi strategies, multi superDOM windows N40K Miscellaneous Support 1 12-20-2004 01:51 AM


All times are GMT -6. The time now is 03:44 PM.