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 geddyisodin, Today, 05:20 AM
      0 responses
      1 view
      0 likes
      Last Post geddyisodin  
      Started by JonesJoker, 04-22-2024, 12:23 PM
      6 responses
      32 views
      0 likes
      Last Post JonesJoker  
      Started by GussJ, 03-04-2020, 03:11 PM
      12 responses
      3,239 views
      0 likes
      Last Post Leafcutter  
      Started by AveryFlynn, Today, 04:57 AM
      0 responses
      5 views
      0 likes
      Last Post AveryFlynn  
      Started by RubenCazorla, 08-30-2022, 06:36 AM
      3 responses
      79 views
      0 likes
      Last Post PaulMohn  
      Working...
      X