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 AaronKoRn, Today, 09:49 PM
          0 responses
          10 views
          0 likes
          Last Post AaronKoRn  
          Started by carnitron, Today, 08:42 PM
          0 responses
          9 views
          0 likes
          Last Post carnitron  
          Started by strategist007, Today, 07:51 PM
          0 responses
          10 views
          0 likes
          Last Post strategist007  
          Started by StockTrader88, 03-06-2021, 08:58 AM
          44 responses
          3,980 views
          3 likes
          Last Post jhudas88  
          Started by rbeckmann05, Today, 06:48 PM
          0 responses
          9 views
          0 likes
          Last Post rbeckmann05  
          Working...
          X