• 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

Moving average crossover alert

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

    Moving average crossover alert

    I have indicator which would plot arrows, sound alert and color change based on moving average crossover. I want to use this indicator in market analyzer for 5 minute chart crossover. I have read this helpful thread
    http://www.ninjatrader.com/support/f...ad.php?t=12316

    I have added necessary code but at compile time ninjaeditor spits out an error that plot0 does not exist in current context. I have attached the indicator file.
    Attached Files

    #2
    Hello trader333,

    I imported the .Zip folder and didn't get any errors. Are you sure this is the file that is producing the error message?

    You can double click on the error message and it will take to the offending code
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      File included with my first post was before I added code from the link in that post, so this file will produce no errors. All I want is to use sma crossover in market analyzer.

      Comment


        #4
        trader333, could you please attach the file directly you're trying to complete and having the current issues with? Easiest would be the straight cs file then from your Documents > NinjaTrader 7 > bin > custom > indicator folder.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          I want to clarify I dont have any problem with the file I am poisting with this message. I want to use this file in market analyzer as moving average crossover alert.
          Attached Files

          Comment


            #6
            Hello,

            Thank you for including this file.

            Unfortunately this is not the entire indicator, it seems you have referenced a MAV indicator that would also need to be included for this to be checked.

            Also I just wanted to check with you on your question, are you simply asking if this can be used in the Market Analyzer?

            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              Thanks Jesse. All I want is to use moving average cross in market analyzer. Indicator posted in the first post does that on the charts so I thought I might use it on market analyzer so I searched a bit and found that thread in the first post and tried that solution which did not work as my programming skills are at first grade level. you asked me to post.cs file which I did. Now you have both files. I was just trying to use moving average crossover in analyzer.

              Comment


                #8
                Hello,

                The second file I can not get to work but I was able to get the first zip file that you had posted to work.

                After looking at the script it seems that this could be easy to implement.

                I have uploaded the revised script, please try this and see if you get the desired result.

                All I have added was an additional data series named crossovers that is set at the same time as the arrows so the trigger would be the arrows.

                Depending if it is a cross above or cross below the data series is set to -1 or 1 and 0 when neutral.

                In the Market Analyzer you will need to select the CrossOver plot and make sure that show arrows is set to true. when you create an alert condition choose if the value equals -1 or 1 to trigger the alert.

                Please let me know if I may be of additional assistance.
                Attached Files
                JesseNinjaTrader Customer Service

                Comment


                  #9
                  Thanks again Jesse. This is what I wanted but see error message when I compile this file.
                  Attached Files

                  Comment


                    #10
                    Hello,

                    The file I used was the first you had uploaded because it worked. The second you had uploaded was different than the first file and was missing a reference so this may be why you are getting errors.

                    It seems from that error that you have is ChannelThis indicator is referencing the DoubleMA indicator but the overloads of the DoubleMA indicator does not match what the ChannelThis is asking.

                    If you provide the full DoubleMA file along with the files that go with so I can compile it on my end I could change the correct one otherwise you would need to either remove the ChannelThis or modify it to correctly call DoubleMA.

                    I look forward to being of further assistance.
                    JesseNinjaTrader Customer Service

                    Comment


                      #11
                      is this what you looking for?. This is the original file with all dependent files in it.
                      Attached Files

                      Comment


                        #12
                        Hello,

                        This is the same as the file you originally uploaded with opening this thread.

                        This may be easier if we try to correct the error in the file that is listed in the image you sent.

                        Please try the following and send me a screenshot of the window after doing the following:

                        From where you are in the image you provided, double click any of the errors listed. This should open a new NinjaScript window and place the cursor at the position of the error.

                        Please take a screenshot of the code that it brings you to. The error that it is lists is stating that the ChannelThis indicator is calling the DoubleMA and it is not calling it correctly.

                        I look forward to being of further assistance.
                        JesseNinjaTrader Customer Service

                        Comment


                          #13
                          I followed your advice and got it fixed.

                          Comment


                            #14
                            Hello,

                            Thank you for letting me know.

                            Please let me know if I may be of additional assistance.
                            JesseNinjaTrader Customer Service

                            Comment


                              #15
                              It worked as expected. How can i make it stick so once crossover happens it should stay until opposite crossover happens. Right now alert dissappears once the candle closes.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by uday12, Today, 09:45 AM
                              0 responses
                              2 views
                              0 likes
                              Last Post uday12
                              by uday12
                               
                              Started by uday12, Today, 08:25 AM
                              3 responses
                              16 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by IanC28, Today, 08:47 AM
                              1 response
                              4 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by trdmark, Today, 07:50 AM
                              1 response
                              16 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by PBreen, Today, 07:42 AM
                              2 responses
                              8 views
                              0 likes
                              Last Post PBreen
                              by PBreen
                               
                              Working...
                              X