![]() |
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Feb 2008
Posts: 177
Thanks: 0
Thanked 0 times in 0 posts
|
Hi,
i have to check this condition for the last 5 Bars : if (Stochastics(3, 14, 7).D > 80 and want to combine it e.g. with a Volume of the curent Bar-condition. Vol[0] >5000 i can do it like this i think : if (Stochastics(3, 14, 7).D[0] > 80 && Vol[0] >5000 ( do that ... ) else if (Stochastics(3, 14, 7).D[1] > 80 && Vol[0] >5000 ( do that ... ) else if (Stochastics(3, 14, 7).D[2] > 80 && Vol[0] >5000 ( do that ... ) and so on up to bar (5) back -- so i have this list that will be checked through every time. Is there an easier solution then this list to do this ? Thank max-td |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
|
Yes, you can do something like:
Code:
if (MIN(Stochastics(3, 14, 7).D, 5)[0] > 80 && Volume[0] > 5000))
// Do something here
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Feb 2008
Posts: 177
Thanks: 0
Thanked 0 times in 0 posts
|
Thank you - works fine
![]() max-td |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SubscribeMarketData does not work properly | moscu | Automated Trading | 18 | 11-13-2008 09:57 PM |
| Ninja not properly closing orders? | islandtrader50 | Miscellaneous Support | 1 | 10-03-2008 08:42 AM |
| BUG: Wizard does not escape properly | NinjaCustomer | Indicator Development | 1 | 06-19-2008 11:04 AM |
| Chart not updating properly | rally7 | Miscellaneous Support | 7 | 09-14-2007 07:42 AM |
| NT6 not closing properly | nightowl | Suggestions And Feedback | 7 | 02-05-2007 12:06 AM |