Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Color bars based on moving averages

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

    Color bars based on moving averages

    Hi, can anyone help me?
    I wanted to paint my price bars either red or green based on whether two moving averages are above or below each other.

    I looked at the 2 posts here on the forum:




    I downloaded the 2 sample scripts and tried to compile them but get an error: "No overload for method "DrawRectangle" takes 8 argument" -I click on CS1501 for more info and thats blank too.

    So I looked around the forum and help function and found the BarColor function and its example here:


    That looks just what I need.Problem is that on compiling it gives an error message too.
    I get ""The name BarColor does not exist in the current context"-when I click on CS0103 for more info its blank.
    I also get an error message "No overload for method "DrawRectangle" takes 8 argument"
    Not sure where this Draw Rectangle error comes from as I have not typed in any thing like it.
    Does anyone know what I'm doing wrong? I have NT7 beta 9 running on XP
    Thanks,
    John

    #2
    John,

    You have installed a NT6.5 indicator into NT7 that was not NT7 compatible. Please remove that indicator and recompile. Then you can use BarColor. BarColor should be used within the OnBarUpdate() method of your indicator.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Hi Josh, thanks for your reply. I did what you suggested and it now works perfectly.
      Thanks very much,
      John

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      626 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      359 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      105 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      562 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      567 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X