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.Text on historical bar

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

    .Draw.Text on historical bar

    Hi NT,

    Can the Draw.Text method be used to draw something on a historical bar ?
    I.E. if a condition is met on the current bar [0], can I used to above to draw on a bar maybe 2 days ago [2]?

    Or can it only draw on the current bar ?

    Code:
    Draw.Text(this, "Buy.S" + (CurrentBar), true, "" + (counter1 * -1) , 0, Low[0] - ((ATR(2))[0]), 20, Brushes.Lime, new SimpleFont("Arial", 12),TextAlignment.Center,Brushes.Transparent, Brushes.Transparent, 0);
    Thanks

    #2
    Hello akvevo,

    The Draw.Text() method has a barsAgo parameter. This is how many bars ago from the current bar do you want this text drawn on.

    Draw.Text(NinjaScriptBase owner, string tag, string text, int barsAgo, double y)

    Currently, you have this set to 0, which is 0 bars ago, which is the current bar.

    Below is a publicly available link to the help guide on Draw.Text().
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      How did i miss that, thank you

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by FrancisMorro, Today, 03:24 AM
      0 responses
      1 view
      0 likes
      Last Post FrancisMorro  
      Started by Segwin, 05-07-2018, 02:15 PM
      10 responses
      1,769 views
      0 likes
      Last Post Leafcutter  
      Started by Rapine Heihei, 04-23-2024, 07:51 PM
      2 responses
      30 views
      0 likes
      Last Post Max238
      by Max238
       
      Started by Shansen, 08-30-2019, 10:18 PM
      24 responses
      943 views
      0 likes
      Last Post spwizard  
      Started by Max238, Today, 01:28 AM
      0 responses
      10 views
      0 likes
      Last Post Max238
      by Max238
       
      Working...
      X