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

Tweeking the ToolBar Shortcut

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

    Tweeking the ToolBar Shortcut

    Hello,
    I got this indicator on the support forum a while back. I don't see it there now so I'm including it for examination.
    I would like to add an additional line button to the tool bar. There is a string array that adds the different lines in the variable section.
    string[] strLines = {"btnmnuRuler", "btnmnuLine", "btnmnuRay", "btnmnuExtendedLine", "btnmnuArrowLine", "btnmnuHorizontalLine", "btnmnuVerticalLine" };
    I would like to add an additional "btnmnuLine" with a different default color. Unfortunately just adding another "btnmnuLine" is the same as the first. Is there a way to add a second line that would include different defaults?
    Thanks
    Attached Files

    #2
    Hello CaptainAmeriaXX,

    Thanks for writing in to our support forums.

    The task you are trying to accomplish is undocumented and there is very little support I may provide you on this matter.

    I can suggest however, that in order to create an additional button, you must first make that button unique to the first line button. After you have made the button unique, you will be able to differentiate when a drawing object is drawn with this "Alternate Color Drawing Object." After the drawing object is created, you will be able to loop through your created drawing objects, identify the drawing objects that were created with the other button, then you will be able to change the color of the newly created drawing object.

    A drawing object toolbar was created for NinjaTrader 8 that has this functionality. You may find it below:


    If you require further assistance developing this indicator, please let me know and I may refer you to our Buisness Development team to get you connected with a 3rd party vendor who offers NinjaScript consulting services.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by WHICKED, Today, 02:02 PM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by selu72, Today, 02:01 PM
    0 responses
    3 views
    0 likes
    Last Post selu72
    by selu72
     
    Started by f.saeidi, Today, 12:14 PM
    8 responses
    21 views
    0 likes
    Last Post f.saeidi  
    Started by Mikey_, 03-23-2024, 05:59 PM
    3 responses
    49 views
    0 likes
    Last Post Sam2515
    by Sam2515
     
    Started by Russ Moreland, Today, 12:54 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Erick  
    Working...
    X