Announcement

Collapse
No announcement yet.

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 Hwop38, 05-04-2026, 07:02 PM
          0 responses
          160 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Started by CaptainJack, 04-24-2026, 11:07 PM
          0 responses
          308 views
          0 likes
          Last Post CaptainJack  
          Started by Mindset, 04-21-2026, 06:46 AM
          0 responses
          245 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          349 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          179 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Working...
          X