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

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 06-17-2012, 06:15 PM   #1
mkaminski
Junior Member
 
Join Date: Jun 2010
Location: Colorado Springs, CO
Posts: 7
Thanks: 1
Thanked 0 times in 0 posts
Default Can someone help with the following adjustment please?

I have unsuccessfully tried to recreate the NT Key Reversal Up/Down indicators so they plot an arrow above/below the bars instead of the vertical bars in a sub-window.

I am hoping someone familiar with NT code will be nice enough to make this adjustment.

For anyone who does help me out, thank you in advance for your time.

Michael
mkaminski is offline  
Reply With Quote
Old 06-17-2012, 06:24 PM   #2
NinjaTrader_Matthew
NinjaTrader Customer Service
 
NinjaTrader_Matthew's Avatar
 
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,783
Thanks: 160
Thanked 566 times in 557 posts
Default

Hello,

Thank you for your post.

You can create a custom indicator which calls the KeyReversalUp and Down indicators. The following snippet should help you get started:

Code:
protected override void OnBarUpdate()
        {
           
			if (KeyReversalUp(1)[0] == 1)
			{
				DrawArrowUp("Up" + CurrentBar, 0, Low[0], Color.Green);
			}
			
			if (KeyReversalDown(1)[0] == 1)
			{
				DrawArrowDown("Down" + CurrentBar, 0, High[0], Color.Red);
			}
        }
NinjaTrader_Matthew 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
Automatic Split Adjustment Stopped Suggestions And Feedback 14 01-10-2011 12:35 PM
Time Adjustment / Sync Oil_Trader Automated Trading 3 12-10-2010 12:31 PM
Volume Adjustment shali27 Miscellaneous Support 7 04-06-2010 09:54 AM
Plot arrow adjustment duck_CA Indicator Development 1 08-01-2008 11:22 PM
chart vertical adjustment dkmtrader Suggestions And Feedback 1 03-18-2008 04:33 PM


All times are GMT -6. The time now is 01:26 AM.