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

Market Facilitation Index

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

    Market Facilitation Index

    Hello,

    I created the BW MFI indicator through NinjaScript using the code given on the following thread: http://www.ninjatrader.com/support/f...ad.php?t=19231

    It works just fine, but I wanted to color code the bars based on the four possible outcomes between volume and the BW MFI indicator. In other words, I would like each bar of the BW MFI to be color coded based on the direction that volume went in relation to the BW MFI. (i.e. volume up and MFI up = green, volume up and MFI down = brown, etc).

    Any help would be appreciated.

    P.S. as simple as this may be, I know very little about coding.

    Thanks.

    #2
    Welcome to our forums goldtrader, you can color the bars according to your conditions in the code with the BarColor method - http://www.ninjatrader-support.com/H.../BarColor.html
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hi Bertrand,

      Thank you for your reply. I tried to fiddle with the code to input the conditional statements but I couldn't make it work. Where in the code do I need to input the conditional color statements?

      I am able to make four colors available for the indicator by using this:

      Add (new Plot(Color.FromKnownColor(KnownColor.Green), PlotStyle.Bar, "VolUpMFIup"));
      Add (new Plot(Color.FromKnownColor(KnownColor.Red), PlotStyle.Bar, "VolDownMFIdown"));
      Add (new Plot(Color.FromKnownColor(KnownColor.Blue), PlotStyle.Bar, "VolDownMFIup"));
      Add (new Plot(Color.FromKnownColor(KnownColor.Brown), PlotStyle.Bar, "VolUpMFIdown"));

      But I still don't know how do tell it to use the specific colors under the different circumstances. Like I said before, my coding ability is next to next to none. I appreciate any help I can get.

      Comment


        #4
        I'm sorry I think I misunderstood your initial request, my pointer was for how to color the price bars on your indicator conditions - if you want to color the indicator plots itself, you would need to use a different plot for each color and then connect those - it's easier than it may sound now, please see for example a sample we've uploaded to show how to change the colors to up / dn / flat for an SMA, the process would be used for your MFI -

        BertrandNinjaTrader Customer Service

        Comment


          #5
          Hey,

          Thanks again for your help. This seems to make a little more sense, but I don't think I am going to be able to do this (I tried applying the BWMFI to the SMA example, but there seems to be too many differences in what I am trying to do). My coding knowledge is just too limited. I know that this would be easy for some one who knows what they are doing. On the other hand, I have wasted several hours trying to do it. Is there any way that I can get this done without having to code it myself? Does NT have people that would do these things? It seems like too minor a job to contact a coding consultant about.

          Thanks,

          Comment


            #6
            goldtrader,

            Unfortunately we do not offer custom programming services. You could try asking a few 3rd party consultants to see if they can get you a reasonable quote.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Vietanhnguyen2hotmailcom, Yesterday, 10:29 AM
            4 responses
            23 views
            0 likes
            Last Post Vietanhnguyen2hotmailcom  
            Started by PhillT, 04-19-2024, 02:16 PM
            4 responses
            36 views
            0 likes
            Last Post PhillT
            by PhillT
             
            Started by ageeholdings, 05-01-2024, 05:22 AM
            5 responses
            37 views
            0 likes
            Last Post ageeholdings  
            Started by reynoldsn, Today, 02:34 PM
            0 responses
            14 views
            0 likes
            Last Post reynoldsn  
            Started by nightstalker, Today, 02:05 PM
            0 responses
            24 views
            0 likes
            Last Post nightstalker  
            Working...
            X