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

AroonUp Down

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

    AroonUp Down

    I am trying to utilize the Aroon indicator in my color bar.

    As variables I have:

    Code:
    private int AroonUp = Aroon(14).Up = 0;
    private int AroonDown = Aroon(14).Down = 0;
    then under OnBarUpdate() I have:

    Code:
    if (AroonUp = 100)
    
    {
    BarColorSeries[0] = Color.Blue;
    }
    Clearly I have something wrong with the variable, and I am sure that I have something wrong with the OnBarUpdate as well.

    I think that it has something to do with DataSeries, but I am not too sure what that means though I have tried to understand it several times when reading it.

    Can you please help me with how to change the bar color when the Aroon Up is 100 and a different bar color when the Aroon Down is 100?

    Thank you

    #2
    Hello Jg123,

    Thank you for your post.

    You would need to only declare the variables AroonUp and AroonDown
    Code:
    private int AroonUp;
    private int AroonDown;
    You would then need to set the value in your OnBarUpdate()
    Code:
    AroonUp = Aroon(14).Up[0];
    ArronDown= Aroon(14).Down[0];
    Then you would test that variable value against 100
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      This helped, thanks.

      it was important for me to take note also that when I was testing for 100, could not use AroonUp = 100 but, instead, needed to say AroonUp == 100.

      Thanks very much for your help.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CortexZenUSA, Today, 12:53 AM
      0 responses
      1 view
      0 likes
      Last Post CortexZenUSA  
      Started by CortexZenUSA, Today, 12:46 AM
      0 responses
      1 view
      0 likes
      Last Post CortexZenUSA  
      Started by usazencortex, Today, 12:43 AM
      0 responses
      5 views
      0 likes
      Last Post usazencortex  
      Started by sidlercom80, 10-28-2023, 08:49 AM
      168 responses
      2,265 views
      0 likes
      Last Post sidlercom80  
      Started by Barry Milan, Yesterday, 10:35 PM
      3 responses
      12 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Working...
      X