Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using special characters or symbols to draw forms or figures not possible with ASCII

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

    Using special characters or symbols to draw forms or figures not possible with ASCII

    Hello

    Some minutes ago, I started to make some tests in my custom indicator adding the way to print and display in a textbox some special characters in order to manually draw some fixed forms and figures for visual purposes, like creating visual separation between 2 items or to highlight important values, i.e. this is nothing about code functionality.

    For example, I just started testing with the next line of code:
    Code:
    string label = "_________———————————̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ———————————_________";
    In the example I use 3 types of "double dash" with the idea to draw different kind of lines without see separations between dash to dash, i.e. ‘——‘ instead of ‘-----‘
    • The underscore that comes by default in the keyboards.
    • The center double dash that doesn't come in the keyboards.
    • That kind of overscore or macron that doesn't come in the keyboards. This symbols is something special because I see it allows to write 2 characters in 2 line, the macron and a character below it, both in the same space.

    And what I need is to confirm if this type of non-ASCII characters don't make any kind of malfunction or wrong operation in the code calculations, cycles, conditions and/or the results the indicator obtains.

    By the way, could be useful if you include a link with the full list of all allowed characters that can be used in the NT8 scripts/indicators.

    I just tried using the Search into the site https://ninjatrader.com/support/helpGuides/nt8/?ninjascript.htm to try to find keywords like ASCII or Unicode, but I tried in 2 different browsers and I see the Search function is not working at this moment.

    Thank you for your help

    #2
    Hello futurenow,

    Thank you for your reply.

    This would be a more generalized C# question and we wouldn't have a list of allowed characters. We couldn't really give a blanket answer as we don't know exactly how you're applying it, but generally Draw.Text can accept strings of symbol sets like Webdings and Wingdings so it's quite likely that you wouldn't run into issues with the use case you've described where you're just using them to draw lines.

    Please let us know if we may be of further assistance to you.

    Comment


      #3
      Thank you for your fast response Kate, you are the best as always!

      Originally posted by NinjaTrader_Kate View Post
      Hello futurenow,
      This would be a more generalized C# question and we wouldn't have a list of allowed characters.
      Yes, I understand this part, and my question was more about to know if there was any kind of special restriction or a limited list of possible characters symbols that can be used to develop NinjaTrader scripts/indicators, so just to avoid any kind of issue that causes the code won't work correctly, as should.



      We couldn't really give a blanket answer as we don't know exactly how you're applying it, but generally Draw.Text can accept strings of symbol sets like Webdings and Wingdings so it's quite likely that you wouldn't run into issues with the use case you've described where you're just using them to draw lines.
      In the main post example above I forgot to specify in what part of the code was the printing process, so just as extra reference it is inside 'OnRender(...)', so in this specific case I'm not using 'Draw.TextFixed()' or 'Draw.Text()', i.e. it is directly inside 'OnRender(...)' as follows:

      Code:
         ...
         protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
         {
         ...
            string label = "_________———————————̅  ̅  ̅  ̅  ̅———————————_________";      //As is, no inside anything else
         ...
         }
         ...


      By the way, what exactly are "Webdings and Wingdings"? I imagine they could be those kind special characters that don't come in the keyboard like: ↕ or ▲ but I'm not sure.



      Thank you
      Last edited by futurenow; 03-11-2021, 03:34 PM.

      Comment


        #4
        Hello futurenow,

        Thank you for your reply.

        I'd imagine that wouldn't cause issues in OnRender, you should be okay there. Webdings and Wingdings are specialty character sets that, you're correct, don't come in the keyboard but can be used for arrows and things like you've pointed out, but they're basically just special fonts.

        Please let us know if we may be of further assistance to you.

        Comment


          #5
          Thank you for your time Kate and for the confirmation about special characters.

          Please read my post in the next link, where I reply to ChelseaB and I give you special thanks for every suggestion, key code portion, and solutions you have provided to me. You are a life saver.

          https://ninjatrader.com/support/foru...70#post1146070
          Last edited by futurenow; 03-11-2021, 03:38 PM.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          599 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          345 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          558 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          558 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X