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 02-26-2009, 12:19 PM   #1
Tobias1985
Junior Member
 
Join Date: Feb 2009
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
Default Highest Bar of e.g. ADX

Hi,
I'm new to this forum and Ninja Trader. First of all, it seems to be a nice tool, but I still have to learn a lot, I guess, until I can use it efficiently to replace me ;-)

I got a lot of question already, but lets first start with this one.
Can I apply in the strategy wizard the function "higest bar" to e.g. ADX.
I mean, if I want to trigger a trade, if the current ADX is 50% of the highest ADX of the last 20 bars.

E.g. the highest ADX in the last 20 bars was 40 and now the ADX has just declined to 20, than I want to trigger a trade.

I already tried it, but it just delivers wired results.

Thanks for any help!!!
Tobias1985 is offline  
Reply With Quote
Old 02-26-2009, 12:43 PM   #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

Instead of trying to use highest bar logic, you could try using MAX. On the left hand side of the Condition Builder, select Indicators->MAX, then change the Input Series to your ADX. Change the period to 20. Offset it by 50%. Then on the right hand side compare it to the current ADX.
NinjaTrader_Josh is offline  
Reply With Quote
Old 02-26-2009, 01:20 PM   #3
Tobias1985
Junior Member
 
Join Date: Feb 2009
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks for the swift reply!
Maybe this solves my problem. Only one question regarding the offset. do i have to input 50% as "50" or "0.5"?
Tobias1985 is offline  
Reply With Quote
Old 02-26-2009, 01:26 PM   #4
Tobias1985
Junior Member
 
Join Date: Feb 2009
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
Default

Ah, I guess, I got it...
Have to add 0,3 (if I want the trigger at 70% of MAX) on the side of the current bar.

Correct me, if I'm wrong :-)
Tobias1985 is offline  
Reply With Quote
Old 02-26-2009, 02:04 PM   #5
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

You are correct.
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
ADX of Ninja different from MT4 pipsheker General Programming 8 05-19-2010 09:49 AM
adx colour change Tonyb Indicator Development 5 02-06-2009 01:13 AM
EMA on the ADX julen Indicator Development 2 09-17-2008 12:49 PM
ADX Lines pivot44 Miscellaneous Support 1 05-14-2008 03:03 PM
Chart's highest is different to dome highest MrBaffalo Charting 16 03-08-2007 04:21 AM


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