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

Sma To Plot Color Bars Not Lines

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

    Sma To Plot Color Bars Not Lines

    Hello, I am trying to edit/develop a simple indicator which will plot colored bars instead of lines.(so when its an up cross all bars are one color and when its a down cross bars are another color.

    I was looking at editing the heikenashi, cut out the code and enter something like "if ma1 cross over ma2, plot green".. you get the point. I did this on tradestation, however it will take me a little while to get used to ninjascript

    any advice how to convert ma crosses into bars?

    thank you

    #2
    Instead of PlotStyle.Line use PlotStyle.Bars when you are adding the plot in the Initialize() method.


    Josh P.NinjaTrader Customer Service

    Comment


      #3
      plot

      thank you, yes thats what I tried before.
      However the lines go all over the screen and not on the bars ... I must be doing it wrong.

      Comment


        #4
        Are you trying to just paint the price bars a different color? If thats the case then you want to use BarColor = Color.Green. Or something like that.

        Josh P.NinjaTrader Customer Service

        Comment


          #5
          !

          Right on the money! thank you there Josh. TradeStation spoiled me I guess. haha.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Tim-c, Today, 02:10 PM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by Taddypole, Today, 02:47 PM
          0 responses
          2 views
          0 likes
          Last Post Taddypole  
          Started by chbruno, 04-24-2024, 04:10 PM
          4 responses
          50 views
          0 likes
          Last Post chbruno
          by chbruno
           
          Started by TraderG23, 12-08-2023, 07:56 AM
          10 responses
          399 views
          1 like
          Last Post beobast
          by beobast
           
          Started by lorem, Yesterday, 09:18 AM
          5 responses
          25 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X