Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw Text at two bars from same signals plus results of first bar

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

    Draw Text at two bars from same signals plus results of first bar

    Hello,
    I am trying to write some code to draw different text results at both bar[5] and bar[2], but currently the text is only drawn at one of the bars, depending on the bars ago value I set for two bool series. The issue is that the code for both the texts is dependant on the same signals from the same bars, bar[0] to bar[6], but in addition, the signal at bar[2] depends on the result at bar[5]. The problem seems to be arising because the results for both bar[5] and bar[2] should arise at the same time, but bar[2] is dependant on the result of bar[5]. When it draws the text result for bar[2], it is correct, indicating that it must have picked up the correct result at bar[5], but the text is not being drawn at bar[5]. Is there some general rule for code in this situation where the later result is also dependant on the earlier one?

    Thank you.

    #2
    Hello GeorgeW,
    Thanks for your post.

    What "tag" are you using for your Draw.Text() ?
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Thanks for your response, Josh.
      Your question led me to the solution - the Tags for both bar[5] and bar[2] Draw.Text were the same. I changed one and it now works.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      57 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      79 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      41 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      101 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      61 views
      0 likes
      Last Post PaulMohn  
      Working...
      X