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

Size of arrow/diamond etc?

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

    Size of arrow/diamond etc?

    Is there a way to control the size of the arrow / diamond etc that are drawn on the chart?

    #2
    Hi ju1234,

    Unfortunately there is no direct way to control this.

    You may try using DrawText in connection with a symbol font, this way you can use the size of the font to adjust the sizing.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by ju1234 View Post
      Is there a way to control the size of the arrow / diamond etc that are drawn on the chart?
      Its extremely annoying that it can't easily be done (NT7 hopefully) , but here's an example of what to do in the meantime.

      Code:
      #region Variables
              private int markersize = 15;
              private    System.Drawing.Font        textFont;
      Code:
      protected override void Initialize()
              {       
                  textFont = new Font("Wingdings 3",markersize);
      This code will draw up and down arrows using wingdings at the high an low. Adjust as needed.

      Code:
      protected override void OnBarUpdate()
              {
                  
                      DrawText("This is an up arrow","‡",0,High[0]+TickSize,Color.Blue, textFont, StringAlignment.Center, Color.Transparent, Color.Transparent, 0);
      
                      DrawText("This is a down arrow","ˆ",0,Low[0]-TickSize,Color.Red, textFont, StringAlignment.Center, Color.Transparent, Color.Transparent, 0);
      Code:
      #region Properties
              
              [Description("Marker Size")]
              [Category("Visual")]
              [Gui.Design.DisplayName("Marker Size")]
              public int MarkerSize
              {
                  get { return markersize; }
                  set { markersize = Math.Max(1,value); }
              }

      Comment


        #4
        You must use the exact Font Name as displayed in the Upper Left DropDown of the "charmap". On my computer I do not have "Wingdings 3" but I do have "Wingdings" and many more. MarkerSize is just an int variable for the Font Size. So make this change if needed.


        // textFont = new Font("Wingdings 3",markersize);
        textFont = new Font("Wingdings",markersize);

        To get to the charmap Strat / Run / type in "charmap" if you did not already know that.

        Hope that helps.

        Comment


          #5
          Will it be possible to change the scale of the various Chart Markers in the Draw Tools menu in version 7 ?? ....the existing markers are so small one cannot (easily) tell the difference between them, and they can easily get lost in a chart being so small currently.

          Thanks...

          Comment


            #6
            Thanks for the input Alfred, we appreciate it. We will make NinjaTrader 7 feature annoucements when available.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              When using these special characters from the wingding files, how do we type the character into our NinjaScript file ? I'm assuming the need to use some ALT+(ASCII CODE) at the keyboard for the extended code, but I'm not able to do that as the script uses the default font loaded at that time and the character comes out different?

              Please advise.

              Comment


                #8
                Open Wordpad, type all the characters of the top row, repeat with shifted keys, then repeat this process with all the other key rows. You should have eight rows of characters. Highlight the whole bunch, move down a (blank) line, paste. Repeat pasting a few times. Now, keeping the top batch as reference, highlight the second group and then select a wingdings character set. Highlight the third group and then change to a different wingdings set. Repeat process for every symbol set you have. Save file and use for reference any time you want to include special characters.
                eDanny
                NinjaTrader Ecosystem Vendor - Integrity Traders

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Karado58, 11-26-2012, 02:57 PM
                8 responses
                14,826 views
                0 likes
                Last Post Option Whisperer  
                Started by Option Whisperer, Today, 09:05 AM
                0 responses
                1 view
                0 likes
                Last Post Option Whisperer  
                Started by cre8able, Yesterday, 01:16 PM
                3 responses
                11 views
                0 likes
                Last Post cre8able  
                Started by Harry, 05-02-2018, 01:54 PM
                10 responses
                3,204 views
                0 likes
                Last Post tharton3  
                Started by ChartTourist, Today, 08:22 AM
                0 responses
                6 views
                0 likes
                Last Post ChartTourist  
                Working...
                X