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 Taddypole, 04-26-2024, 02:47 PM
            5 responses
            32 views
            0 likes
            Last Post eDanny
            by eDanny
             
            Started by kujista, 04-23-2024, 06:23 AM
            6 responses
            45 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by giulyko00, 04-24-2024, 12:03 PM
            7 responses
            34 views
            0 likes
            Last Post eDanny
            by eDanny
             
            Started by NM_eFe, Today, 10:13 AM
            0 responses
            10 views
            0 likes
            Last Post NM_eFe
            by NM_eFe
             
            Started by hdge4u, Yesterday, 12:23 PM
            1 response
            10 views
            0 likes
            Last Post hdge4u
            by hdge4u
             
            Working...
            X