Go Back   NinjaTrader Support Forum > NinjaTrader 8 > Add-On Development

Add-On Development General NinjaScript development questions.

NinjaTrader
Reply
 
Thread Tools Display Modes
Old 03-10-2017, 04:00 PM   #1
aligator
Senior Member
 
Join Date: Apr 2010
Posts: 461
Thanks: 88
Thanked 62 times in 54 posts
Default NinjaTrader 8 Icon Dictionary

Dear Support,

Looking for a reference that provides a list or a dictionary of NT8 Icon definitions similar to the following:

"AndrewsPitchfork", NinjaTrader.Gui.Tools.Icons.DrawAndrewsPitchfork ,etc.

A few of specific definitions for Icons of interest are:

Delete All Drawing Objects,
Snap Mode
Stay in Draw Mode

Thank you.
aligator is offline  
Reply With Quote
Old 03-11-2017, 01:54 PM   #2
NinjaTrader_Jesse
NinjaTrader Customer Service
 
NinjaTrader_Jesse's Avatar
 
Join Date: Mar 2014
Location: Denver, CO
Posts: 4,203
Thanks: 28
Thanked 1,085 times in 1,014 posts
Default

Hello aligator,

Thank you for the post.

I am unsure of a specific resource we offer that lists all of these resource keys, I will need to further research this to see what I can locate.

For the time being, you may look into using an approach similar to the following forum item. The poster used images that are included in the download, this is not necessarily optimal but could get you results for the time being. http://ninjatrader.com/support/forum...d=9&linkid=781

Once I have further information on this I will reply back here.

I look forward to being of further assistance.
NinjaTrader_Jesse is offline  
Reply With Quote
Old 03-12-2017, 06:46 PM   #3
aligator
Senior Member
 
Join Date: Apr 2010
Posts: 461
Thanks: 88
Thanked 62 times in 54 posts
Default

Quote:
Originally Posted by NinjaTrader_Jesse View Post
Hello aligator,

Thank you for the post.

I am unsure of a specific resource we offer that lists all of these resource keys, I will need to further research this to see what I can locate.

For the time being, you may look into using an approach similar to the following forum item. The poster used images that are included in the download, this is not necessarily optimal but could get you results for the time being. http://ninjatrader.com/support/forum...d=9&linkid=781

Once I have further information on this I will reply back here.

I look forward to being of further assistance.
Thank you Jesse,

The link helps, but it introduces Bitmap and .jpg buttons that will takes things a little beyond the scope of what I am coding.

I assume that Ninja has definitions for all Icons as part of the main toolbar and its sub-menus. I was able to find definitions for all drawing tools such as:

Code:
btnRay = new System.Windows.Controls.Button { Content = NinjaTrader.Gui.Tools.Icons.DrawRay, };
for DrawRay.

So, I am trying to find a similar content definition for other items in the drop down menu under the Drawing Tools, i.e. DeleteAllDrawingObjecs or SnapMode icons.

Many thanks.
aligator is offline  
Reply With Quote
Old 03-14-2017, 08:39 AM   #4
NinjaTrader_Jesse
NinjaTrader Customer Service
 
NinjaTrader_Jesse's Avatar
 
Join Date: Mar 2014
Location: Denver, CO
Posts: 4,203
Thanks: 28
Thanked 1,085 times in 1,014 posts
Default

Hello
.
I just wanted to reply back on this item.

Yes internally there is a set of icons used, it appears these are Font Icons in a custom font and not resources. This means that most items internally seem to use a specific font and then a specific code for the image. At this time I have been unable to retrieve a list or any other information regarding how to access these icons from NinjaScript. I have put in a feature request to gather further information on this subject. For the time being including your own resources or images would likely be the only way to accomplish this.

I look forward to being of further assistance.
NinjaTrader_Jesse is offline  
Reply With Quote
Old 12-07-2017, 05:47 AM   #5
ruppschtaler
Junior Member
 
Join Date: Mar 2015
Location: Cape Town
Posts: 9
Thanks: 0
Thanked 0 times in 0 posts
Default

Hi there,

I'm wondering if you can provide some information how to access these custom font icons (NInjaTrader.Gui.Tools.Icons) in an Add-On by now?

Thank you!
ruppschtaler is offline  
Reply With Quote
Old 12-08-2017, 01:53 PM   #6
NinjaTrader_Jesse
NinjaTrader Customer Service
 
NinjaTrader_Jesse's Avatar
 
Join Date: Mar 2014
Location: Denver, CO
Posts: 4,203
Thanks: 28
Thanked 1,085 times in 1,014 posts
Default

Hello,

Thank you for the post.

The answer to this question was provided in a previous post:

Code:
btnRay = new System.Windows.Controls.Button { Content = NinjaTrader.Gui.Tools.Icons.DrawRay, };
The Content of the control in question would be set to the string for the icon you want like shown in this example.

Are you unable to use the icon as a content for a specific control in an addon?

The control being used needs to allow for Fonts to be used and have the custom font as its selected font, please see this post for an example of the syntax: https://ninjatrader.com/support/foru...10&postcount=4

I look forward to being of further assistance.
NinjaTrader_Jesse is offline  
Reply With Quote
Old 12-08-2017, 04:59 PM   #7
aligator
Senior Member
 
Join Date: Apr 2010
Posts: 461
Thanks: 88
Thanked 62 times in 54 posts
Default

Quote:
Originally Posted by NinjaTrader_Jesse View Post
Hello,

Thank you for the post.

The answer to this question was provided in a previous post:

Code:
btnRay = new System.Windows.Controls.Button { Content = NinjaTrader.Gui.Tools.Icons.DrawRay, };
The Content of the control in question would be set to the string for the icon you want like shown in this example.

Are you unable to use the icon as a content for a specific control in an addon?

The control being used needs to allow for Fonts to be used and have the custom font as its selected font, please see this post for an example of the syntax: https://ninjatrader.com/support/foru...10&postcount=4

I look forward to being of further assistance.
Hi Jessie,

I am able to implement a button for many icons such as Ray as I have defined above:


Code:
btnRay = new System.Windows.Controls.Button { Content = NinjaTrader.Gui.Tools.Icons.DrawRay, };
Without making it too complicated please , can you provide a similar statement for a button for Chart Trader (Hidden) option Icon which is a sub-menu item in the main tool bar?

The following:

Code:
btnChartTraderHidden = new System.Windows.Controls.Button { Content = NinjaTrader.Gui.Tools.Icons.ChartTraderHidden, };
works fine and will draw the Icon, but because it is a sub-menu item it depends on the status of Chart Trader Icon on main toolbar. Once this button is clicked, it will hide the Chart Trader, but will not reverse the action if clicked again.

Many Thanks
Last edited by aligator; 12-08-2017 at 07:00 PM.
aligator is offline  
Reply With Quote
Old 12-08-2017, 07:18 PM   #8
aligator
Senior Member
 
Join Date: Apr 2010
Posts: 461
Thanks: 88
Thanked 62 times in 54 posts
Default

Quote:
Originally Posted by ruppschtaler View Post
Hi there,

I'm wondering if you can provide some information how to access these custom font icons (NInjaTrader.Gui.Tools.Icons) in an Add-On by now?

Thank you!
ruppschtaler, Hi

There is no such documented information available, at least not that I know.

When I was writing the code for mahToolBar2 (https://ninjatrader.com/support/foru...ks.php?catid=7),
I simply got the list from Ninja Inteliprompt list box here:

https://ninjatrader.com/support/helpGuides/nt8/en-us/

So, in editor type: NInjaTrader.Gui.Tools.Icons. and simply pick the icon that you want from the drop down list box.

Hope this help.

Cheers!
Last edited by aligator; 12-08-2017 at 07:22 PM.
aligator is offline  
Reply With Quote
Old 12-13-2017, 10:38 AM   #9
ruppschtaler
Junior Member
 
Join Date: Mar 2015
Location: Cape Town
Posts: 9
Thanks: 0
Thanked 0 times in 0 posts
Default

Hello aligator, Hello Jesse,
Just the reference to the 'IconsFamily' custom font was missing - now it's working perfect.
Thanks for your support!
ruppschtaler 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
Dictionary zachj General Development 18 09-24-2013 06:54 AM
Color Dictionary? Mike Kantomer General Development 13 08-29-2012 11:25 AM
IOrder in a dictionary Radical General Development 2 05-16-2012 02:26 PM
Exposing a dictionary blarouche Indicator Development 8 10-20-2009 10:25 AM
Nasty bug trying to add() to a Dictionary... funk101 General Development 2 04-18-2009 10:46 PM


All times are GMT -6. The time now is 06:37 PM.

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.