Go Back   NinjaTrader Support Forum > NinjaTrader 8 > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

NinjaTrader
Reply
 
Thread Tools Display Modes
Old 12-07-2017, 08:58 AM   #16
NinjaTrader_ChelseaB
NinjaTrader Customer Service
 
NinjaTrader_ChelseaB's Avatar
 
Join Date: Dec 2012
Location: Denver, CO
Posts: 7,707
Thanks: 120
Thanked 1,704 times in 1,606 posts
Default

Hello Michael,

What are you trying to accomplish by using fixed text and adding current bar to the tag with unique strings.

Unique tags make new objects. Re-usuing tags updates the existing object.

Fixed text draws in a specific corner or in the center. If you have a new object for every bar they will layer on top of each other. Is this what you are wanting?

Are you wanting new objects on top of each other?

Or are you wanting one drawing object in the corner?


You can change the color of text in a text box but you would need to unlock the code and modify it by hand to do so.

Below is a publicly available link to the help guide on Draw.TextFixed(). Please see the Parameters.
https://ninjatrader.com/support/help..._textfixed.htm
NinjaTrader_ChelseaB is offline  
Reply With Quote
Old 12-07-2017, 09:03 AM   #17
michi08
Senior Member
 
Join Date: Aug 2010
Location: MX
Posts: 175
Thanks: 42
Thanked 3 times in 1 post
Default

Hello ChelseaB,

I want one drawing object in the top right corner.

I thought that it is was wrong because I don't want objects on top of each other and I did delete the string "Current Bars".
But I can still see both text over each other.
michi08 is offline  
Reply With Quote
Old 12-07-2017, 09:09 AM   #18
NinjaTrader_ChelseaB
NinjaTrader Customer Service
 
NinjaTrader_ChelseaB's Avatar
 
Join Date: Dec 2012
Location: Denver, CO
Posts: 7,707
Thanks: 120
Thanked 1,704 times in 1,606 posts
Default

Hello Michael,

How many different tag names are being used in your script?

How many objects using different tag names are being set to that corner?
NinjaTrader_ChelseaB is offline  
Reply With Quote
Old 12-07-2017, 09:14 AM   #19
michi08
Senior Member
 
Join Date: Aug 2010
Location: MX
Posts: 175
Thanks: 42
Thanked 3 times in 1 post
Default

Hello ChelseaB,

2

one for rising condition
and
one for falling condition
Attached Files
File Type: cs AllDirection.cs (2.5 KB, 0 views)
michi08 is offline  
Reply With Quote
Old 12-07-2017, 09:18 AM   #20
NinjaTrader_ChelseaB
NinjaTrader Customer Service
 
NinjaTrader_ChelseaB's Avatar
 
Join Date: Dec 2012
Location: Denver, CO
Posts: 7,707
Thanks: 120
Thanked 1,704 times in 1,606 posts
Default

Hello Michael,

With two drawing objects using two different tag names these will both appear. If they are set to the same corner they are going to be on top of each other.

So do you want two objects stacked on top of each other or one object that has the text updated?
NinjaTrader_ChelseaB is offline  
Reply With Quote
Old 12-07-2017, 09:19 AM   #21
michi08
Senior Member
 
Join Date: Aug 2010
Location: MX
Posts: 175
Thanks: 42
Thanked 3 times in 1 post
Default

Hello ChelseaB,

I think I did understand the Fixed Text the wrong way. Does Fixed Text means that those texts are all the time visible?

What I'm looking for is when a condition ,for example, a "rising SMA" is given a text appears.
michi08 is offline  
Reply With Quote
Old 12-07-2017, 09:30 AM   #22
NinjaTrader_ChelseaB
NinjaTrader Customer Service
 
NinjaTrader_ChelseaB's Avatar
 
Join Date: Dec 2012
Location: Denver, CO
Posts: 7,707
Thanks: 120
Thanked 1,704 times in 1,606 posts
Default

Hello Michael,

All drawing objects remain on the chart unless they are removed with RemoveDrawingObject() or RemoveDrawingObjects() or unless they are moved by the tag name being reused.

This includes drawing objects that are drawn on specific bars, which remain on the bar they are drawn on, or objects that are drawn in a specific fixed corner of the chart.

No drawing objects do not automatically get removed after they are drawn.

You can have a condition that ensures no other conditions are true (by explicitly using the opposite conditions) and then call RemoveDrawingObjects() if you want to remove all drawing objects on bars where the condition is not true.
NinjaTrader_ChelseaB is offline  
Reply With Quote
The following user says thank you to NinjaTrader_ChelseaB for this post:
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
Feature Request - Strategy Builder use named ATM strategy JMont1 Strategy Development 10 08-23-2017 01:16 PM
Deleted strategy from Strategy Builder still appears in Strategy Analyzer phillim1089 Strategy Development 6 04-03-2017 08:41 AM
NT8 Strategy Builder offset not working with Strategy Analyzer JMont1 Strategy Development 1 12-19-2016 11:21 AM
Strategy Builder kipper Strategy Development 1 07-06-2008 01:29 PM


All times are GMT -6. The time now is 02:54 AM.

Futures, foreign currency and options trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results. View Full Risk Disclosure.

CFTC Rules 4.41 - Hypothetical or Simulated performance results have certain limitations, unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

This website is hosted and operated by NinjaTrader, LLC (“NT”), a software development company which owns and supports all proprietary technology relating to and including the NinjaTrader trading platform. NT is an affiliated company to NinjaTrader Brokerage (“NTB”), which is a NFA registered introducing broker (NFA #0339976) providing brokerage services to traders of futures and foreign exchange products. This website is intended for educational and informational purposes only and should not be viewed as a solicitation or recommendation of any product, service or trading strategy. No offer or solicitation to buy or sell securities, securities derivative or futures products of any kind, or any type of trading or investment advice, recommendation or strategy, is made, given, or in any manner endorsed by any NT affiliate and the information made available on this Web site is not an offer or solicitation of any kind. Specific questions related to a brokerage account should be sent to your broker directly. The content and opinions expressed on this website are those of the authors and do not necessarily reflect the official policy or position of NT or any of its affiliates. 

Vendors along with their websites, products and services, collectively referred to as (“Vendor Content”), are independent persons or companies that are in no manner affiliated with NT or any if its affiliates. NT or any of its affiliates are not responsible for, do not approve, recommend or endorse any Vendor Content referenced on this website and it’s your sole responsibility to evaluate Vendor Content. Please be aware that any performance information provided by a vendor should be considered hypothetical and must contain the disclosures required by NFA Rule 2-29(c). If you are interested in learning more about, or investigating the quality of, any such Vendor Content you must contact the vendor, provider or seller of such Vendor Content. No person employed by, or associated with, NT or any of its affiliates is authorized to provide any information about any such Vendor Content.