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

Help creating moving average highlight bars

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

    Help creating moving average highlight bars

    Hi! I'm trying to create an indicator that will color bars either red or green.

    Green if: Simple Moving Avg, Close, 8 period is > than the Simple Moving Avg, open, 8 period.
    Red if: reverse of above

    Can someone please help me with this?

    #2
    Hi maggiej12, thanks for your post.

    You would need to use the BarBrushes array (or just BarBrush) to change the bar color based on a condition.


    See here for an example use case:

    This is a basic sample on how to implement a color gradient to your charts price bars using an RSI for the calculations. Converted from NT7 version provided by jortuzar.


    If you have any questions on this material please let me know.

    The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Thank you for the info! However, I don't even know where to go from here, this is way too complicated for me. If i try to customize this for my indicator, its not going to make any sense. Is there someone who would create this for me?

      Comment


        #4
        Hello maggiej12,

        Thank you for your reply.

        NinjaTrader has a handful of third-party programming consultants that can help you build custom indicators. You can search our extensive library of NinjaScript consultants through the link below. Simply enter a consultant name or search by using our filter categories. Once you have identified your consultants of choice, please visit each consultant's site for more information or contact them directly to learn more:You can locate the contact information for the consultants on their direct websites for any additional questions you may have. Since these consultants are third-party services for NinjaTrader, all pricing and support information will need to be obtained through the consultant.

        The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The companies and services listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem, LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

        Let me know if I may be of further assistance.

        Comment


          #5
          maggiej12,

          This does not provide for your specific request but gives you an indicator that contains the basic coding concept of what you are after:

          Standard MACD that changes the bar colors based on the MACD crossing above or below. User input allows you to define the colors used


          Perhaps it helps.

          sandman

          Attached Files

          Comment


            #6
            Originally posted by maggiej12 View Post
            Hi! I'm trying to create an indicator that will color bars either red or green.

            Green if: Simple Moving Avg, Close, 8 period is > than the Simple Moving Avg, open, 8 period.
            Red if: reverse of above

            Can someone please help me with this?
            Hello, I modify MACDbarcolor set it to 8 period EMA of High and Low, this is not a professional coding practice but it will meet you specs.

            Click image for larger version

Name:	2020-03-05_1725.png
Views:	607
Size:	43.3 KB
ID:	1089534

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by techgetgame, Yesterday, 11:42 PM
            0 responses
            8 views
            0 likes
            Last Post techgetgame  
            Started by sephichapdson, Yesterday, 11:36 PM
            0 responses
            2 views
            0 likes
            Last Post sephichapdson  
            Started by bortz, 11-06-2023, 08:04 AM
            47 responses
            1,615 views
            0 likes
            Last Post aligator  
            Started by jaybedreamin, Yesterday, 05:56 PM
            0 responses
            10 views
            0 likes
            Last Post jaybedreamin  
            Started by DJ888, 04-16-2024, 06:09 PM
            6 responses
            20 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Working...
            X