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 siroki, Today, 03:22 AM
              0 responses
              10 views
              0 likes
              Last Post siroki
              by siroki
               
              Started by nailui, Today, 03:01 AM
              1 response
              11 views
              0 likes
              Last Post NinjaTrader_Jason  
              Started by an.fedorov, Today, 02:32 AM
              0 responses
              10 views
              0 likes
              Last Post an.fedorov  
              Started by rustyspring, Today, 01:31 AM
              1 response
              13 views
              0 likes
              Last Post NinjaTrader_Jason  
              Started by op1031, Today, 12:26 AM
              0 responses
              12 views
              0 likes
              Last Post op1031
              by op1031
               
              Working...
              X