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

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 PaulMohn, Today, 12:36 PM
              2 responses
              16 views
              0 likes
              Last Post PaulMohn  
              Started by Conceptzx, 10-11-2022, 06:38 AM
              2 responses
              53 views
              0 likes
              Last Post PhillT
              by PhillT
               
              Started by Kaledus, Today, 01:29 PM
              0 responses
              3 views
              0 likes
              Last Post Kaledus
              by Kaledus
               
              Started by yertle, Yesterday, 08:38 AM
              8 responses
              37 views
              0 likes
              Last Post ryjoga
              by ryjoga
               
              Started by rdtdale, Today, 01:02 PM
              1 response
              6 views
              0 likes
              Last Post NinjaTrader_LuisH  
              Working...
              X