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

Draw.TextFixed in Chart

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

    Draw.TextFixed in Chart

    Hello,

    I have made me an indicator plotting important numbers directly in the chart. All calculations and Draw.TextFixed is working OK untill now.

    But when I want to have the Draw.TextFixed only after 9:30 EST I can not make it working and it is still plotting before that time. I have

    if (ToTime(Time[0]) >= 093000 && ToTime(Time[0]) < 161500)
    {
    string str8 = string.Empty;
    str8+="O: " + priceratio;
    Draw.TextFixed(this,"str8",str8, TextPosition.TopLeft,Brushes.Black, new SimpleFont ("Arial",12), Brushes.White,Brushes.White,100);}

    What am I doing wrong or what should I add with time condition please?

    Thank you!
    Tony

    #2
    Hello tonynt,

    Thanks for your post.

    I suspect what is happening is that the text is being updated between the hours you have specified but after the hours it is not being updated and it continues to display the last update. If you want to remove the FixedText then like any draw object you would have to remove it using RemoveDrawObject("str8");
    Reference: https://ninjatrader.com/support/help...drawobject.htm
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hello,

      thank you for your reply. I resolved it with a bool switching with time.

      Tony

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by chbruno, 04-24-2024, 04:10 PM
      2 responses
      46 views
      0 likes
      Last Post chbruno
      by chbruno
       
      Started by WHICKED, Today, 12:45 PM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by samish18, Today, 01:01 PM
      0 responses
      5 views
      0 likes
      Last Post samish18  
      Started by WHICKED, Today, 12:56 PM
      0 responses
      8 views
      0 likes
      Last Post WHICKED
      by WHICKED
       
      Started by Spiderbird, Today, 12:15 PM
      2 responses
      11 views
      0 likes
      Last Post Spiderbird  
      Working...
      X