• 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 bubblegum, Yesterday, 01:13 AM
    2 responses
    12 views
    0 likes
    Last Post bubblegum  
    Started by Atilla, Yesterday, 04:05 PM
    1 response
    51 views
    1 like
    Last Post im197
    by im197
     
    Started by vevbarrq, Today, 12:11 AM
    0 responses
    4 views
    0 likes
    Last Post vevbarrq  
    Started by johnnybegoode, Yesterday, 10:16 PM
    0 responses
    4 views
    0 likes
    Last Post johnnybegoode  
    Started by reedstickets, Yesterday, 07:53 PM
    0 responses
    9 views
    0 likes
    Last Post reedstickets  
    Working...
    X