Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

How to Set Icon In Drawing Tool

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to Set Icon In Drawing Tool

    Hi
    I have code that produces a horizontal ray. I think I amended it from Labelled Horizontal line from memory, but I can't be sure.
    It works lovely but I can't seem to change the Icon - it doesn't exist in the context error?
    Can anyone provide a solution?

    Here is my code.

    The error line is at the bottom - I want to change it to an Icon I never use as it currently reverts to Fibonacci Extensions which I do use.

    Attached Files

    #2
    Hello Mindset,

    Thanks for your post.

    The most consistent way to do that would be how the DrawingToolTile indicator gets icons for the tools it uses. In that situation it uses the string name of each tool, creates an instance of said tool and retrieves its icon for the buttons. That would be the logic starting at line 189.

    You can also view the code for the internal drawing tools to look for their Icon override to find the constant value, for example the andrews pitchfork has Gui.Tools.Icons.DrawAndrewsPitchfork.​
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by diegomezhur, Today, 05:33 PM
    0 responses
    2 views
    0 likes
    Last Post diegomezhur  
    Started by amichalska, Today, 01:23 PM
    2 responses
    14 views
    0 likes
    Last Post amichalska  
    Started by GreyKerns09, Today, 03:42 PM
    0 responses
    6 views
    0 likes
    Last Post GreyKerns09  
    Started by PrTester, 12-29-2008, 05:27 PM
    133 responses
    96,731 views
    0 likes
    Last Post aligator  
    Started by ETFVoyageur, Yesterday, 12:26 PM
    6 responses
    29 views
    0 likes
    Last Post ETFVoyageur  
    Working...
    X