Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple Time Frame help

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

    Multiple Time Frame help

    I'm creating a multiple time frame strategy and am trying to refernece a custom indicator.

    I looked up the support page on referencing indicators with multiple time frames here;


    I reference my indicator on a single time frame strategy like this;
    BidAskHistVolumeFiltered(1, BuyFilter.AllVolume, SellFilter.AllVolume, 50, false, false).Buys[0]

    How would I reference it on a multiple time frame strategy, as the above link dealing with indicators doesn't seem to apply.

    Thanks,

    Safetrading

    #2
    Safetrading, this would then call your indicator on the primary series - you could also pass in another bars array or call in another BarsInProgress context then, whichever you prefer.

    Comment


      #3
      reply

      I'm using this indicator in my primary series. I am using the indicator in an MRO expression like this;

      int NoBuyers = MRO(delegate{return BidAskHistVolumeFiltered(1, BuyFilter.AllVolume, SellFilter.AllVolume, 50, false, false).Buys[0] < 11;},1,25);

      then in my buy condition, it is referenced like this;

      && NoBuyers > -1

      If I comment out the MRO and the condition line, my strategy runs fine. When it is include however, after I enable the strategy on the chart, it automatically disables itself, as when I open up the strategy window again, in the General section, next to Enabled, it says False, when I previously marked it True. Why does it do this?

      Comment


        #4
        Please have a look at your Control Center's log tab for any error messages, do you have a CurrentBars check for all involved series running at the OnBarUpdate() start?

        Comment


          #5
          reply

          I only have a CurrentBar check for the primary series, is there a sample piece of code I can look at that would show the proper syntax for a CurrentBar check for multiple series?

          Thanks,

          Safetrading

          Comment


            #6
            Sure, please see for example this link here for a suitable snippet: http://www.ninjatrader.com/support/h...urrentbars.htm

            Comment


              #7
              reply

              I looked at the Log tab and found the error message saying, "MRO can't be run on multi series strategies. Is there a work around for this, or another way to immitate the MRO process?

              Comment


                #8
                Good spot, thanks - in this case you would need to custom code the MRO logic for multiseries use.

                Comment


                  #9
                  reply

                  In that case, are there by chance any code snippets on line of this sort of thing?

                  Thanks again,

                  Safetrading

                  Comment


                    #10
                    Sorry, I'm at this time not aware of any floating around I could point you to - will keep it mind for sure.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    651 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    370 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    109 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    574 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    577 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X