![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Dec 2007
Posts: 314
Thanks: 0
Thanked 0 times in 0 posts
|
I have an indicator that places text below the bar. I have a condition statement that if true it places the word "buy" below the bar. However later in the code if a different condition is true, I want to ERASE the word "buy" and print "major buy" instead. (this indicator is a CalculateOnBarClose false)
Problem: How do I erase the word "buy". Here is my code for the "buy": DrawText("Text11"+ CurrentBar, "buy", 0, Low[0] - 4 * TickSize, Color.Black); Here is how I am trying to remove it: RemoveDrawObject("Text11"); Is the text an actual DrawObject? Thanks
Last edited by velocity; 12-21-2009 at 06:46 AM.
|
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Jan 2009
Location: Budapest, HUNGARY
Posts: 258
Thanks: 0
Thanked 0 times in 0 posts
|
|
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Dec 2007
Posts: 314
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks for the suggestion, but that did not do it.
Support, Any other Ideas? thanks |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Jan 2009
Location: Budapest, HUNGARY
Posts: 258
Thanks: 0
Thanked 0 times in 0 posts
|
Velocity,
I think that you are using the (example) "Text11288" object, but the "Text11" object you want to remove. Check: Print ( "Text11" + CurrentBar);
Last edited by tamas; 12-21-2009 at 07:06 AM.
|
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Dec 2007
Posts: 314
Thanks: 0
Thanked 0 times in 0 posts
|
I don't think that's the problem.
|
|
|
|
|
|
#6 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
velocity,
That is the problem. Your objects are uniquely named, just use a static name and instead of drawing new objects all the time, it will just modify the preexisting object. Remove the + CurrentBar from your tag name.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can not see text in text properties tool - still | aslane | Version 7 Beta General Questions & Bug Reports | 5 | 12-01-2009 01:52 PM |
| removing text from screen | always4nu | Charting | 5 | 10-01-2009 08:20 AM |
| Can not see text in text properties tool | aslane | Charting | 4 | 04-02-2009 12:48 PM |
| Removing Label | dwalls | Charting | 4 | 05-10-2008 02:03 PM |
| Removing Fibs | JohnG | Suggestions And Feedback | 4 | 08-03-2007 08:17 AM |