Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

My indicator gave me different result on Chart and Market Analyzer

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

    My indicator gave me different result on Chart and Market Analyzer

    I created a simple indicator :
    ----
    if 50EMA is more than 200EMA, Plot equal +1.
    if 50EMA is less than 200EMA, Plot equal -1.
    ----

    The following is my code:
    Code:
    			
    if (EMA(50)[1] > EMA(200)[1]){
    				Plot2.Set(1);			
    }
    			
    if ( EMA(200)[1] > EMA(50)[1]) {
    				Plot2.Set(-1);
    				
    }
    My indicator worked well on Chart. But when I use it to scan in Market Analyzer, I get wrong result. It's weird that not all stocks return the result in Market Analyzer.

    Please check the attached picture. It shows my indicator worked well on ARNA daily chart (Plot = +1), but in Market Analyzer it returned -1.

    I would appreciate your suggestion.
    Thanks
    Attached Files

    #2
    Hello,

    Likely you will want to set the bars to load to a higher number.

    Is the alert not working at all? What does your indicator display in market analyzer?
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      My indicator displayed the correct number on the chart of all stocks.
      But in Market Analyzer some stocks displayed the wrong number.

      Please check the attached picture.
      You can find my indicator displayed +1 on ARNA's daily chart.
      But in Market Analyzer the scan result of ARNA displayed -1.

      Thanks
      Last edited by syunhou; 09-23-2012, 10:13 PM.

      Comment


        #4
        Hello,

        Likely you will want to set the "# bars to look back" to a higher number. Currently you are set to load 50 days in the market analyzer, but a 200 period moving average requires 200 days to actually be the correct calculation.

        The way the SMA works internally is that currently, if you are loading 50 days and using daily data for your input series, it would be a 50 period moving average right when you add it to a market analyzer. It would take another 150 days to pass before it would actually be a 200 period moving average here.
        Adam P.NinjaTrader Customer Service

        Comment


          #5
          Thank you for your help.
          My indicator works well now.

          Comment


            #6
            Hi Adam

            I have almost same problem when I use CCI in Market Analyzer.
            The number of CCI which displayed in Market Analyzer is not same as the number displayed on chart.
            Even I increased "# of bars to look back", CCI still displayed the different number.
            BTW: CCI is the default indicator of Ninja. I didn't modify.

            Is there any other setting that can cause this problem?

            Thanks

            Comment


              #7
              syunhou,

              In Market-replay, indicators typically operate as if "Calculate on bar close" is equal to "False". As such they are updating tick-by-tick rather than on the bar close. If you set your chart RSI's "Calculate on bar close" setting to "False" it may match.
              Adam P.NinjaTrader Customer Service

              Comment


                #8
                Thank you so much.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                633 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                364 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                105 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                567 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                568 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X