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

New and need help w MACD changing bar colors

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

    New and need help w MACD changing bar colors

    Hi,

    I'm new to this forum and new to Ninja script and am hoping someone can get me started on programming my bar charts to change color with certain MACD conditions.

    Very simply I want the bar to turn green if the MACD is both above the signal line and above zero. I want the bar to turn red if the MACD is both below the signal line and below zero.

    Thanks,
    BB

    #2
    BB, welcome to our forums - without diving fully into custom this script via NinjaScript / C# you could use our point and click strategy wizard interface to create this coloring for your chart via a Strategy.



    I've attached your little example as a courtesy to get started down this path easier.

    You can import the zip file via File > Utilities > Import NinjaScript.

    Play around with it and good luck,
    Attached Files
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Bertrand,

      Thank you for the start, I appreciate the help. Unfortunately, it didnt work. I plugged it into a range bar chart and all the HLOC bars remained black. Is there some way i'm not aware of to implement the strategy?

      Comment


        #4
        You're welcome, is the enable parameter for your strategy set to 'true', so it would actually run live on this chart?
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Got it, thanks.

          Comment


            #6
            Bertrand,
            Thank you again for the strategy, it's working just fine. I did have to remove and reinstall NT, so I had to come find it again to reload it.

            I was wondering if there's anything that could be done to allow me to use what you created AND chart trader. Right now, as you probably already know, the strategy disables chart trader. And, if you were using a strategy to actually place trades, that might make sense.

            Comment


              #7
              Glad to hear it's working fine for you BB, unfortunately it would be either ChartTrader activated or a Strategy running on the chart - we have allowing both items on our list of feedback in product management and I've surely added your vote in here as well.

              A workaround would be either using 2 charts, one for the strategy, the other for ChartTrader or just entering orders over the DOM interface while having the chart on the side.

              Yet another would be using custom coding to convert the analysis of the strategy to an indicator so you would apply it to a chart with ChartTrader enabled.
              BertrandNinjaTrader Customer Service

              Comment


                #8
                i figured the custom code would be the answer for now. Using two charts is not very efficient. You could get used to it, just not what I want to end up with.

                I'll wait a little while and see what happens with the next few updates. If it does come down to custom code, do you have any suggestions you could PM to me?

                Comment


                  #9
                  Correct, for now it would come down to moving your script to an indicator based one via custom coding.

                  To get started down this path, I would suggest working through those tutorials -



                  If you would prefer to get this ported professionally for you, a NinjaScript consultant could assist in the process - http://www.ninjatrader.com/partners#...pt-Consultants
                  BertrandNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by geotrades1, Today, 10:02 AM
                  1 response
                  4 views
                  0 likes
                  Last Post NinjaTrader_BrandonH  
                  Started by ender_wiggum, Today, 09:50 AM
                  1 response
                  5 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by rajendrasubedi2023, Today, 09:50 AM
                  1 response
                  12 views
                  0 likes
                  Last Post NinjaTrader_BrandonH  
                  Started by bmartz, Today, 09:30 AM
                  1 response
                  9 views
                  0 likes
                  Last Post NinjaTrader_Erick  
                  Started by geddyisodin, Today, 05:20 AM
                  3 responses
                  26 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Working...
                  X