Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi-Time Frame Indicator in Market Analyzer

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

    Multi-Time Frame Indicator in Market Analyzer

    I was trying to have the value from one of my multi-time frame indicators show up in a market analyzer column but the value of the indicator would not display. I created a test indicator using the wizard to see if I could just get a 1 to show up in the market analyzer. This worked successfully, but when I add the line "Add(PeriodType.Day, 1);" to Initialize() the value displayed in the market analyzer is now 0. I have the main data series set to 60 min data. Is it possible make this work? The code below produces a 0 in the indicator column when the main data series set to 60 min.
    Code:
    protected override void Initialize()
    {
        Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
        Add(PeriodType.Day, 1);
        Overlay = true;
    }
    
    protected override void OnBarUpdate()
    {
        Plot0.Set(1);
    }

    #2
    Hello,

    Thanks for your note.

    Can you please confirm that you can in fact pull up daily data for this instrument.

    As if the daily data cannot be loaded for all data series added the indicator will not plot.

    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      Yes I do have daily data. I'm using $USDCHF with gain and ninja servers.

      Comment


        #4
        Hello,

        First thing that needs added is a bar check to make sure you have enough bars. This is important for daily data.

        if(CurrentBars[0] < 5 && CurrentBars[1] < 5)
        return;

        Right before you Plot0.Set(1);

        http://www.ninjatrader.com/support/h...urrentbars.htm

        Let me know if I can be of further assistance.

        BrettNinjaTrader Product Management

        Comment


          #5
          Of course, thanks. I forgot to look in the log, the error message there always reminds me to add that line in. That also helped me understand what was happening with my original indicator. I simply needed to increase the "# of bars to look back" for my original indicator, I didn't have enough data loaded. I guess my confusion was in that they worked fine on my chart but not in the Market Analyzer.

          Thanks again for the help and the extremely quick responses. I really appreciate it and I did also want to say that the support here is First Class.

          Comment


            #6
            Thank You Very Much.
            BrettNinjaTrader Product Management

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            110 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            59 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            37 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            41 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            78 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X