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 > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 11-12-2009, 07:41 AM   #1
Frederic
Member
 
Join Date: Sep 2009
Posts: 52
Thanks: 0
Thanked 0 times in 0 posts
Send a message via MSN to Frederic
Default strategy using VolumeUpDown

Hello,

I would like to create a strategy using the VolumeUpDown indicator. My strategy must look at the last 2 green bars of the indicator. how can i write it?
VolumeUpDown()[
0]) is all what i can find. isn't there a (VolumeUpDown.VolumeDomwn()[0]) or(VolumeUpDown()[0].VolumeUp ???

Thanks for help

Regards,
Frederic
Frederic is offline  
Reply With Quote
Old 11-12-2009, 08:06 AM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
Default

Please try VolumeUpDown().Values[0][0] and VolumeUpDown().Values[1][0].

[0][0] being up.
[1][0] being down.
NinjaTrader_Josh is offline  
Reply With Quote
Old 11-12-2009, 09:11 AM   #3
Frederic
Member
 
Join Date: Sep 2009
Posts: 52
Thanks: 0
Thanked 0 times in 0 posts
Send a message via MSN to Frederic
Default

Hello Josh,

Thanks a lot. It is what I was looking for. I want that the my strategy look if the actual VolumeUpDown (Down) is greater than the precedent one.
VolumeUpDown().Values[1][1] > VolumeUpDown().Values[1][0])

Is VolumeUpDown working with it?


Thanks for all..

Regards,
Frederic
Frederic is offline  
Reply With Quote
Old 11-12-2009, 09:40 AM   #4
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
Default

If you want the current to be greater than the previous you need to do [1][0] > [1][1] not [1][1] > [1][0].
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
Put Daily Volume on VolumeUpDown Indicator dwalls Indicator Development 1 02-27-2009 10:06 AM
Volumeupdown indicator incorrect chuckt101 Miscellaneous Support 3 11-19-2008 07:12 AM


All times are GMT -6. The time now is 09:12 PM.