Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Question On Paint Bar Indicator

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

    Question On Paint Bar Indicator

    Hello. I have put together a paint bar strategy which paints the price bars one of four colors depending on whether the MACD is above/below zero and whether the price bar closes in the upper/lower half of it's range. I did this using the strategy wizard. I now want to convert that into an indicator so I can free up chart trader, which I prefer to the dom. I have very limited programming experience. Is there an easy way to convert this "strategy" into an indicator? If not, can you point me to some tutorials that can help me get this accomplished? I am a big fan of paint bar studies but I don't want to continue to shell out $150 to a developer every time I have an idea. Thanks for your consideration.

    Chuck

    #2
    Hi Chuck,

    It should generally work the same, as long as there are no order methods. You will want to copy and paste the custom code from your strategy into an indicator.

    Look at the following regions / methods and place the custom items in the same place in the indicator.
    Variables
    Initialize
    OnBarUpdate
    Properties

    If the indicator references prior bar value, then you'll need to be sure to look into this is a potential issue you might see in an indicator but not a strategy.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_RyanM View Post
      Hi Chuck,

      It should generally work the same, as long as there are no order methods. You will want to copy and paste the custom code from your strategy into an indicator.

      Look at the following regions / methods and place the custom items in the same place in the indicator.
      Variables
      Initialize
      OnBarUpdate
      Properties

      If the indicator references prior bar value, then you'll need to be sure to look into this is a potential issue you might see in an indicator but not a strategy.
      http://www.ninjatrader-support.com/v...ead.php?t=3170
      Hello Ryan. I just want to be clear. Are you saying to only copy and paste the code from the four regions/methods listed above an ignore all the other code in the strategy? For example, the declarations region and wizard settings region? Thanks

      Chuck

      Comment


        #4
        HI Chuck,

        Attached is a screenshot of the SampleMACrossover strategy code. The custom code for the four sections you need are highlighted with a red rectangle.
        Attached Files
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_RyanM View Post
          HI Chuck,

          Attached is a screenshot of the SampleMACrossover strategy code. The custom code for the four sections you need are highlighted with a red rectangle.
          Thanks a bunch Ryan. That was much easier than I thought. I'm beginning to understand now how the code is structured by the wizard and how to manipulate it to get what I want.

          Best Regards
          Chuck

          Comment


            #6
            Glad to hear, Chuck. Thanks for following up.
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            571 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            330 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            548 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            548 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X