• 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 johnnybegoode, Yesterday, 08:11 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Started by bebbus, Today, 07:14 AM
    0 responses
    2 views
    0 likes
    Last Post bebbus
    by bebbus
     
    Started by YevhenShynkarenko, Today, 02:55 AM
    1 response
    46 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by kenz987, Yesterday, 07:58 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Started by kujista, Today, 06:14 AM
    0 responses
    5 views
    0 likes
    Last Post kujista
    by kujista
     
    Working...
    X