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

Resizing Arrows, Dots.....

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

    Resizing Arrows, Dots.....

    I thought I read in one of these post that there was a way to Resize Arrows and Dots. I have searched the threads in this forum with no luck. I even used my favorite keyboard key "F1" and no luck there. And I probably have not used the correct search term(s). Is there a way to use DrawText in combination with Character Codes to create Arrows and other symbols on a chart? If so, how? And where can I get a list of the character codes.

    Thanks

    #2
    I don't know about resizing DrawDot() etc, but if you use DrawText with symbols you can resize those through the selection of the font size. Here is an indicator that actually uses this exact method: http://www.ninjatrader-support.com/v...ead.php?t=2919

    To find a character map I just used your computer's charmap. Start Menu -> Run -> charmap
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Many Thanks. Will review the code.

      Comment


        #4
        Chart Characters

        I am not a professional software developer but I do play one in my free time (LOL). I thought I would contribute to the forum instead of take,take,take.

        I imported the indicator below and struggled to get it working as is. Below is my solution to making it work.

        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"
        // textFont = new Font("Wingdings 3",markersize);
        textFont = new Font("Wingdings",markersize);
        After making that simple change the below indicator worked fine.


        Important things to remember if adding custom arrows, dots, triangles and other things to your charts...

        In the
        #region Variables
        you must have this line of code
        private System.Drawing.Font textFont;
        In the
        protected override void OnBarUpdate()
        you need to define the font with
        textFont = new Font("Wingdings",markersize);
        "Wingdings" can be changed to any Font listed in your charmap. "markersize" is just the font size and can be an variable or hard coded ( insert any integer instead of variable " markersize".

        In the DrawText line of code you can insert the arrow, dot, or any other character available by using the copy feature in the charmap and replacing the "‡" with "new character"

        DrawText("High"+barcounter.ToString(),"‡",period,H igh[period]+TickSize,color, textFont,..............

        So, on my charts I use a large green arrow when all conditions are true for a Buy Entry, a smaller light green arrow when 3 out of 4 conditions are true for a buy entry and a small black arrow when 2 of 4 conditions are true. I will still take the entry signal for all arrows but will keep a tighter leash on the 2 and 3 true condition entries.

        Hope this helps someone.




        Originally posted by Josh View Post
        I don't know about resizing DrawDot() etc, but if you use DrawText with symbols you can resize those through the selection of the font size. Here is an indicator that actually uses this exact method: http://www.ninjatrader-support.com/v...ead.php?t=2919

        To find a character map I just used your computer's charmap. Start Menu -> Run -> charmap

        Comment


          #5
          I don't have a current use for this, but I'm definitely bookmarking it because it looks like something that will be very helpful.

          Thanks for passing it along.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by i2ogu3, Yesterday, 11:31 PM
          2 responses
          17 views
          0 likes
          Last Post i2ogu3
          by i2ogu3
           
          Started by cmtjoancolmenero, 04-29-2024, 03:40 PM
          21 responses
          68 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by llanqui, Today, 11:13 AM
          5 responses
          7 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by llanqui, 04-28-2024, 10:32 AM
          10 responses
          38 views
          0 likes
          Last Post llanqui
          by llanqui
           
          Started by samish18, 04-17-2024, 08:57 AM
          27 responses
          118 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Working...
          X