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

Indicator code placement

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

    #16
    Hello JTizz,

    Thank you for your note.

    To understand why the script is behaving as it is, it is necessary to add prints to the script that print the values of the conditions so you may see why the condition is/is not becoming true and allowing BarBrush to bet set.

    In the script add prints (outside of any conditions) that print the values of every variable used in every condition along with the time of that bar. Prints will appear in the NinjaScript Output window (New > NinjaScript Output window).

    Below is a link to a forum post that demonstrates using prints to understand behavior and including a link to a video recorded using the Strategy Builder.
    https://ninjatrader.com/support/foru...121#post791121

    Also, see the attached example script that demonstrates using BarBrush to change the color of a bar when Close[0] > Resistance[0] or when Close[0] < Support[0].

    Please let me know if I may further assist
    Attached Files
    Brandon H.NinjaTrader Customer Service

    Comment


      #17
      Thanks for the info and help. Everything works perfectly.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by f.saeidi, Today, 12:14 PM
      4 responses
      12 views
      0 likes
      Last Post f.saeidi  
      Started by Russ Moreland, Today, 12:54 PM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by philmg, Today, 12:55 PM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_ChristopherJ  
      Started by TradeForge, 04-19-2024, 02:09 AM
      2 responses
      32 views
      0 likes
      Last Post TradeForge  
      Started by aprilfool, 12-03-2022, 03:01 PM
      3 responses
      329 views
      0 likes
      Last Post NinjaTrader_Adrian  
      Working...
      X