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

Rising/Falling colors for MA...

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

    Rising/Falling colors for MA...

    Hi,
    Is there some easy way/method to set colors for rising/falling MAs similar to BackColor method? If rising set color green, falling- red, neutral - black... Also, is there a way to set dash style please?
    Thank you.

    #2
    Art, yes you can set up a filter and then change the color based on your filters. Please see the "Understanding cell conditions" section on this page for how.

    Can you please clarify what you mean by setting the dash style? You can select from the options in the screenshot for which dash style you wish to use.
    Attached Files
    AustinNinjaTrader Customer Service

    Comment


      #3
      Thank you Austin. I meant line dash style, how to set the line dash style programmatic. Sorry to confuse you.
      Thank you again.

      Comment


        #4
        Art, to use the dash style, please use this bit of code, as indicated in the screenshot I posted:
        Code:
        DashStyle.Dash;
        AustinNinjaTrader Customer Service

        Comment


          #5
          Thank you Austin, but I'm still not clear how to change the dash style in this case:

          Add(new Line(Color.Lime, 20, "Lower"));

          What should follow to change the dash style of above line please? I was hoping for the 3-rd argument but Add() takes only two...
          Thank you very much.

          Comment


            #6
            Art09, please try this in the Initialize() -

            Code:
            Add(new Line(Color.Lime, 20, "Lower"));
            			
            Lines[0].Pen.DashStyle = DashStyle.Solid;
            BertrandNinjaTrader Customer Service

            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,266 views
            0 likes
            Last Post sidlercom80  
            Started by Barry Milan, Yesterday, 10:35 PM
            3 responses
            13 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Working...
            X