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

Change font with zoom level

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

    Change font with zoom level

    Is it possible to change fontsize of Draw.Text so that it scales better when you zoom in and out of a chart (CTRL + Arrow up/down)? I'm drawing arrows with Wingdings 3 font and they are too big when I zoom out and not inline with the scaling of the chart.

    #2
    Hello PMitchum,

    That would currently not be possible, the text object scale is calculated inside the Draw.Text object so that would not be possible to change from another script. You could make a new draw text script or use OnRender if you wanted to draw text in a custom way. The existing drawing objects code is available in the NinjaScript editor so you could make a new object if you wanted to change its OnRender calculations.
    JesseNinjaTrader Customer Service

    Comment


      #3
      I see. I can't say I'm not disappointed. I find Ninjatrader to lack many options for plotting styles. Using Dots,Blocks or TriangleUp/Down are pretty much the only thing useful to use for "signal arrows". The Cross can't even be scaled without looking like a blob.

      Metatrader 4 has had the option to use Webdings and Wingdings(2, 3) fonts as plot arrows since 2005. I'm surprised Ninjatrader is so far behind there. What good is using Draw.Text if it can't even scale properly? If I can request a feature it would be to be able to use the above as plot style.

      Comment


        #4
        Hello PMitchum,

        The platform comes with a base set of items that you can use but really its targeted at being a C# development platform. Most customizations would come from either importing them or creating them yourself. This platform is targeted at custom development to tailor it to your personal trading style. When you want to go beyond the basic trading tools that the platform comes with that relies on using items that you have made or imported from other sources.

        The default drawing objects are scaled along with the settings of the chart. NinjaTrader includes the source code for those items in case you wanted to customize them in any way. You can make copies of the existing drawing objects if you wanted to make them render in a custom way or adjust differently than the platform default.

        NinjaTrader also has had the option to use any custom font for many years, you can use any fonts you have installed on your PC. Some fonts can contain symbols and those can be used with DrawText to produce custom symbols on the chart. You need to specify the SimpleFont when drawing the text, a SimpleFont can come from any installed font you have.
        https://ninjatrader.com/support/help...sub=SimpleFont
        https://ninjatrader.com/support/help.../draw_text.htm

        To have a custom plot style beyond the defaults you can see the following link of a sample that modifies a plots stroke style. Any indicator which plots data could also implement code like this to make a custom plot style. Existing indicators would need to be duplicated so you can edit them by using Right click -> Save AS. In the duplicate you can add other code to modify the default indicator to look differently or work differently.



        Last edited by NinjaTrader_Jesse; 01-09-2023, 09:43 AM.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by selu72, Today, 02:01 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Zachary  
        Started by WHICKED, Today, 02:02 PM
        2 responses
        12 views
        0 likes
        Last Post WHICKED
        by WHICKED
         
        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
        51 views
        0 likes
        Last Post Sam2515
        by Sam2515
         
        Started by Russ Moreland, Today, 12:54 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Erick  
        Working...
        X