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

text disappearing

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

    text disappearing

    Hi

    I have this line of code in an Indicator and on some chart it appears and some it doesn't

    DrawText("Session High", ("Session High " + currentHigh) , -18, currentHigh, Color.Green);

    Am I missing something ????

    Thank you in advance

    #2
    Hello richbois,

    Thanks for your post.

    In your code sample it appears you are using -18 bars for the "barsAgo". A negative value puts the text 18 bars into the future which may or may not show on the chart unless you move the databack 18 + bars from the right edge. Did you mean to put it 18 bars in the past? If so then just use 18.

    Reference: http://ninjatrader.com/support/helpG.../?drawtext.htm
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Paul View Post
      Hello richbois,

      Thanks for your post.

      In your code sample it appears you are using -18 bars for the "barsAgo". A negative value puts the text 18 bars into the future which may or may not show on the chart unless you move the databack 18 + bars from the right edge. Did you mean to put it 18 bars in the past? If so then just use 18.

      Reference: http://ninjatrader.com/support/helpG.../?drawtext.htm
      Yes I did want to print in the future to the right of the line that is drawn for the session high.
      i reduced the futures to 10 and now it is working on regular charts.

      Thank you for your help

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by judysamnt7, 03-13-2023, 09:11 AM
      4 responses
      59 views
      0 likes
      Last Post DynamicTest  
      Started by ScottWalsh, Today, 06:52 PM
      4 responses
      36 views
      0 likes
      Last Post ScottWalsh  
      Started by olisav57, Today, 07:39 PM
      0 responses
      7 views
      0 likes
      Last Post olisav57  
      Started by trilliantrader, Today, 03:01 PM
      2 responses
      21 views
      0 likes
      Last Post helpwanted  
      Started by cre8able, Today, 07:24 PM
      0 responses
      10 views
      0 likes
      Last Post cre8able  
      Working...
      X