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

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 PhillT, Today, 02:16 PM
            1 response
            1 view
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by Kaledus, Today, 01:29 PM
            3 responses
            9 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by frankthearm, Yesterday, 09:08 AM
            14 responses
            47 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Started by gentlebenthebear, Today, 01:30 AM
            2 responses
            13 views
            0 likes
            Last Post gentlebenthebear  
            Started by PaulMohn, Today, 12:36 PM
            2 responses
            17 views
            0 likes
            Last Post PaulMohn  
            Working...
            X