Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Color moving average

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

    Color moving average

    (EN)
    Hello, is there any way to put a color to a moving average when it falls and another color when it rises.

    (ES)
    Hola, hay alguna forma de poner de un color a una media movil cuando baja y de otro color cuando sube.

    Gracias.

    #2
    Hi nikelado80,

    Thank you for your post.

    You can work with this sample code and change the used MA formula to your needs, the coloring would work the same way -

    http://www.ninjatrader-support2.com/...ead.php?t=3227

    This is for the SMA as demonstration, you can change all SMA calls to EMA and use this then. For more indicators already coded out, oftentimes with color changes, please check into our sharing section -

    http://www.ninjatrader-support2.com/...splay.php?f=37

    For learning how to start out coding / adapting your own, please review those tutorials -

    http://www.ninjatrader-support.com/H...verview18.html
    Ryan O.NinjaTrader Customer Service

    Comment


      #3
      thank you very much, but I need the WMA, as I can change SMA by the WMA.

      Comment


        #4
        Hi nikelado80,

        That code sample is used for any MA indicator, and rather than have it reference the SMA indicator you can reference the WMA indicator and then use the same principles for modifying the color.
        Ryan O.NinjaTrader Customer Service

        Comment


          #5
          (EN)
          Hello RyanOlson not refer to the indicator as WMA.
          I am new trader ninja. Could you tell me how I can do it step by step.

          (ES)
          Hola RyanOlson, no se como hacer referencia al indicador WMA.
          Soy nuevo en ninja trader. Podrias decirme como puedo hacerlo paso por paso.

          Comment


            #6
            Hi nikelado80,

            We are able to offer assistance with custom programming, but are not able to produce the code. If you share with us the code you are using we can offer details on how to implement certain coding, but we would build off of the code you provide.

            For the indicator with multiple colors the links I provided earlier will get you started with custom programming in NinjaTrader.

            I would recommend that you download the attached file and then import into NinjaTrader.

            To import:

            1. From the Control Center window select the menu File > Utilities > Import NinjaScript to open the Import NinjaScript dialog window
            2. Select the file you want to import
            3. Press the "Open" button


            Then please go to Tools-->Edit NinjaScript-->find the Sample Multi Colors indicator and then highlight and hit OK to open the programming window.



            From there you can use that sample to implement the multi-color indicators for the WMA.



            Additionally, please see the following link:



            Also, there is a group of consultants who can code NinjaScript on your behalf.
            Attached Files
            Ryan O.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by bortz, 11-06-2023, 08:04 AM
            47 responses
            1,603 views
            0 likes
            Last Post aligator  
            Started by jaybedreamin, Today, 05:56 PM
            0 responses
            8 views
            0 likes
            Last Post jaybedreamin  
            Started by DJ888, 04-16-2024, 06:09 PM
            6 responses
            18 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by Jon17, Today, 04:33 PM
            0 responses
            4 views
            0 likes
            Last Post Jon17
            by Jon17
             
            Started by Javierw.ok, Today, 04:12 PM
            0 responses
            12 views
            0 likes
            Last Post Javierw.ok  
            Working...
            X