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 Educational Resources > Reference Samples

Reference Samples Official NinjaScript reference code samples

Reply
 
Thread Tools Display Modes
Old 07-23-2009, 10:55 AM   #1
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 Strategy: Removing draw objects from the chart

Reference sample for NinjaTrader 6.5.XXXX.X or greater.

Drawing objects can be used for a number of different purposes, like keeping track of where a strategy has its entry point, profit target, and stop loss. If a strategy draws an object(s) for every trade it takes, the chart could quickly become cluttered. This sample will show how to remove the objects that aren't necessary anymore.


NOTE:
This is a real-time only strategy. Please view this strategy on a real-time data connection or the Simulated Data Feed.

This reference sample demonstrates the following concepts:
  • Drawing lines at the price where the orders are that extend for the duration of the trade
  • Removing those lines when the trade is over
Important methods and properties used include:Other methods and properties of interest include:Import instructions for NinjaTrader 6.5.XXXX.X or greater:
  1. Download the file contained in this thread to your PC desktop
  2. From the Control Center window, select the menu File > Utilities > Import NinjaScript
  3. Select the downloaded file
Attached Files
File Type: zip SampleRemoveDrawObjects.zip (3.5 KB, 239 views)
File Type: zip SampleRemoveDrawObjects_NT7.zip (3.6 KB, 224 views)
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
not allow to move with draw objects zooinek Indicator Development 1 05-19-2009 10:00 AM
Draw objects vs Plots eDanny Suggestions And Feedback 7 03-25-2009 10:47 AM
Plotting Draw Objects to another Panel dwalls NinjaScript File Sharing Discussion 2 10-13-2008 09:29 AM
Draw Objects SteveB Suggestions And Feedback 1 03-12-2008 07:48 AM
Anchor Draw Objects Mike Winfrey Indicator Development 1 01-28-2008 02:51 PM


All times are GMT -6. The time now is 05:52 AM.