• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Change the text size in a strategy

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

    Change the text size in a strategy

    How can I change the size of a text in a strategy?

    DrawText("Punkt3" + CurrentBar , "3" , Swing(stärke).SwingLowBar (0,1,20), Low[Swing(stärke).SwingLowBar (0,1,20)]- TickSize * abstand , Color.Black);

    Thank you

    #2
    Hello Ironman9973, and thank you for your question.

    There is a reference sample that goes over exactly what you're looking for. Please see the 'changing fonts for draw objects' page for further information. I am providing an example.

    Code:
     int stärke = 14, abstand = 2;
    Font helveticaFont = new Font("Helvetica", 14);
    bool autoscale = false;
    int yPixelOffset = 0;
    int opacity = 0;
    DrawText("Punkt3" + CurrentBar , autoscale, "3" , Swing(stärke).SwingLowBar (0,1,20), Low[Swing(stärke).SwingLowBar (0,1,20)]- TickSize * abstand , yPixelOffset, Color.Black, helveticaFont, StringAlignment.Center, Color.Black, Color.White, opacity);
    
    I am including a link to the Help Guide page for DrawText and a publicly available MSDN link for Font.

    http://ninjatrader.com/support/helpG...7/drawtext.htm
    https://msdn.microsoft.com/en-us/lib...wing.font.aspx

    Please let us know if there is any other way we can help.
    Jessica P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by w0lverine, Today, 03:57 AM
    1 response
    2 views
    0 likes
    Last Post NinjaTrader_ChrisSch  
    Started by hundert, 02-24-2019, 07:55 AM
    2 responses
    43 views
    0 likes
    Last Post jpraema
    by jpraema
     
    Started by digibob, Today, 02:47 AM
    0 responses
    2 views
    0 likes
    Last Post digibob
    by digibob
     
    Started by NinjaCustomer, Today, 12:57 AM
    1 response
    5 views
    0 likes
    Last Post NinjaCustomer  
    Started by lancasterstephen, Today, 12:09 AM
    1 response
    6 views
    0 likes
    Last Post lancasterstephen  
    Working...
    X