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


    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 elirion, Today, 01:36 AM
                              0 responses
                              3 views
                              0 likes
                              Last Post elirion
                              by elirion
                               
                              Started by gentlebenthebear, Today, 01:30 AM
                              0 responses
                              4 views
                              0 likes
                              Last Post gentlebenthebear  
                              Started by samish18, Yesterday, 08:31 AM
                              2 responses
                              9 views
                              0 likes
                              Last Post elirion
                              by elirion
                               
                              Started by Mestor, 03-10-2023, 01:50 AM
                              16 responses
                              391 views
                              0 likes
                              Last Post z.franck  
                              Started by rtwave, 04-12-2024, 09:30 AM
                              4 responses
                              34 views
                              0 likes
                              Last Post rtwave
                              by rtwave
                               
                              Working...
                              X