![]() |
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
|
|||||||
| Version 7 Beta General Questions & Bug Reports Ask questions here and post bug reports. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
|
Let's say I do a DrawRay("ABC"...) on my chart so that I have a draw object created. Is it possible to query to see if that object exists on the chart? I just want a true/false property or method to tell me if it exists or not.
Thanks!
Price-Dynamics.com
A NinjaTrader Official Partner Visit http://www.price-dynamics.com to learn more about the Rhythm Relay trading system. Yes, you can discretionary or auto-trade with 75%+ accuracy! Use our Contact Us page to request free access to our daily Trader's Lounge where you can see the system in action in a live account! |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Code:
foreach(IDrawObject drawObject in DrawObjects)
{
if (drawObject.DrawType == DrawType.Ray && drawObject.Tag == "ABC")
{
// Do something here
break;
}
}
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
|
Nice... thanks for exposing that object for us. :-)
Also, you used to be able to click on and manually move or delete draw objects that were created by a Draw...() function. Now you have to remove the whole indicator that drew it. Is this intended functionality? Thanks again --
Price-Dynamics.com
A NinjaTrader Official Partner Visit http://www.price-dynamics.com to learn more about the Rhythm Relay trading system. Yes, you can discretionary or auto-trade with 75%+ accuracy! Use our Contact Us page to request free access to our daily Trader's Lounge where you can see the system in action in a live account! |
|
|
|
|
|
#4 | |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Quote:
AllowRemovalOfDrawObjects = true;
Ray
NinjaTrader Customer Service |
|
|
|
|
|
|
#5 |
|
Member
Join Date: Mar 2009
Posts: 33
Thanks: 0
Thanked 0 times in 0 posts
|
The code provided by Ray seems to give access only to the user drawn drawobjects.
Is there a way to get access to the drawobjects drawn by indicators? Is there a way to draw drawobjects programmatically in other panels than the price panel?
Last edited by WolliWilli; 11-21-2009 at 09:33 AM.
|
|
|
|
|
|
#6 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
The DrawObjects colllection contains objects that are user drawn and drawn by the host indicator or strategy. There is no access to other objects drawn by other indicators etc...
To draw in the indicator panel set the the following property to false in Initialize() DrawOnPricePanel = false;
Ray
NinjaTrader Customer Service |
|
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to tell whether a draw object exists? | cassb | General Programming | 9 | 04-02-2012 01:04 PM |
| Deleting Draw Object Programatically | TAJTrades | General Programming | 1 | 05-18-2009 09:35 AM |
| Get price for a draw object | binwang2 | General Programming | 1 | 01-30-2009 11:47 AM |
| Draw Object-Hash | dwalls | Indicator Development | 1 | 11-10-2008 10:46 AM |
| Getting draw object information | SuzyG | Strategy Development | 3 | 05-22-2008 01:37 PM |