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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      47 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      23 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      33 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      50 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Working...
      X