• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Please Help me with Simple indicator.

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

    Please Help me with Simple indicator.

    Hi all.

    kindly can anyone help me to have the following indicator with the exact setting:
    I need ( sample moving average) indicator with two colors (red and green). if candle "CLOSED" above moving average (MOVING AVERAGE WILL BE GREEN COLOR
    And if candle "CLOSED" below moving average (MOVING AVERAGE WILL BE RED).
    It must be work in any pairs and any time frame and have alert sound.

    That is all.

    Thanks in advance for any help.

    #2
    Hello savio,

    While I cannot write this script for you, this thread will remain open for any community members that would like to assist.

    The code you need is to check that the close of the bar is less than the sma. If so, then use the Plot pen object to change the color of the plot.
    http://ninjatrader.com/support/helpGuides/nt7/plots.htm

    For example:
    if (Close[0] > SMA(15)[0])
    {
    // execute code
    }
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea B,

      Thanks for your reply.
      actually i didn't have any idea about coding

      again appreciate your reply and i hope someone can help.

      Comment


        #4
        Hello,
        For practice and training purposes I have create a Sample that will do what you are requesting. When the Closing price is greater than the Simple Moving Average the moving average will plot as green. When the Closing Price is less than the Simple Moving Average the moving average will plot as red. I have also added in that if the Closing Price is equal to the Simple Moving average to plot the moving average as blue.

        To Import:
        Download the NinjaScripts to your desktop, keep them in the compressed .zip file.

        From the Control Center window select the menu File> Utilities> Import NinjaScript

        Select the downloaded .zip file

        NinjaTrader will then confirm if the import has been successful.

        Critical - Specifically for some NinjaScripts, it will prompt that you are running newer versions of @SMA, @EMA, etc. and ask if you want to replace, press 'No'

        Once installed, you may add the indicator to a chart by:

        Right click you chart > indicators > Select the Indicator from the list on the left(Should appear as SampleColorPlot > New > OK
        Please let me know if I can be of further assistance.
        Attached Files
        Cody B.NinjaTrader Customer Service

        Comment


          #5
          Hi,

          I didn't androstand what youmean by

          " From the Control Center window select the menu File> Utilities> Import NinjaScript"

          can you please upload it as .mq4

          thanks

          Comment


            #6
            Originally posted by savio View Post
            Hi,

            I didn't androstand what youmean by

            " From the Control Center window select the menu File> Utilities> Import NinjaScript"

            can you please upload it as .mq4

            thanks
            download the indicator that Cody made for you.

            1) save it on your desktop as a zip file
            2) open ninja trader
            3) click on file tab
            4) scroll down and click on utilities
            5) select "import"
            6) find the indicator that you saved on your desktop and then click OK
            7) wizard should end and give you a message that the indicaotr was imported succesfully. Then open up a brand new chart. and then add the indicator that you just exported..

            Comment


              #7
              Originally posted by savio View Post
              Hi,

              I didn't androstand what youmean by

              " From the Control Center window select the menu File> Utilities> Import NinjaScript"

              can you please upload it as .mq4

              thanks
              .mq4?

              I think you are in the wrong place. NinjaTrader is NOT MetaTrader. Their language is different, and so is the platform.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Da vinci, Today, 04:19 PM
              0 responses
              5 views
              0 likes
              Last Post Da vinci  
              Started by brunoviveiros, Today, 09:36 AM
              1 response
              19 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by GARZONJ, Today, 11:22 AM
              1 response
              10 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by KonalGondal, Today, 10:18 AM
              1 response
              19 views
              0 likes
              Last Post NinjaTrader_Kate  
              Started by Jorge.andres.o, Today, 09:24 AM
              4 responses
              23 views
              0 likes
              Last Post NinjaTrader_PaulH  
              Working...
              X