Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

MTF indicator not plotting correctly

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

    MTF indicator not plotting correctly

    Wondered if anyone can tell me how to get the secondary bar series (12R) to plot correctly
    .
    The blue line in panel 2 is based on the chart bars (6R); the secondary line (red) is based on an "added" bar series (12R) which is plotting sporadically..



    The following image shows 2 charts; the top one is a 12-tick bar chart (so both the chart bars and the indicator bars (referencing BarsArray[1] which is also 12-tick) are the same bar period) where it is plotting as expected and the 6-bar chart below it where the 6-bar indicator is plotting o.k., the 12-bar (secondary bar set) is "sporadic" (i.e. not plotting continuously across the chart).
    .


    Indicator is attached.

    Appreciate any suggestions.

    Thanks,
    Saroj

    P.S. I modified this post later to add the new image and clarify the problem.
    Attached Files
    Last edited by saroj; 08-27-2011, 08:17 AM.

    #2
    saroj, we are unfortunately not able to debug scripts like this. If you haven't done so already, please take a look at the multi-time frame stuff we have. A quick glance at your code suggests that these plots are not plotted on every OnBarUpdate, which is why they are sporadic.

    AustinNinjaTrader Customer Service

    Comment


      #3
      right... that's the point of MTF indicators... to have different bars on the chart and act on them - in this case to plot an indicator based on them in panel 1. so "OnBarUpdate" is called for every bar drawn, whether or not a Chart bar or an alternate bar.

      Can you point me to where I can see an example of plotting from BarsArray[1], BarsArray[2] etc. please. Maybe I'm going blind, but I had read through where you referred me to numerous times before posting my problem and saw nothing regarding plotting against them.

      Saroj

      Comment


        #4
        OK... figured it out... plotting has to be within the chart bar logic... corrected indicator and it is plotting o.k.

        Comment


          #5
          saroj, glad to hear you got it working. Please let us know if you have any other questions.
          AustinNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by geddyisodin, 04-25-2024, 05:20 AM
          8 responses
          60 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by jxs_xrj, 01-12-2020, 09:49 AM
          4 responses
          3,287 views
          1 like
          Last Post jgualdronc  
          Started by Option Whisperer, Today, 09:55 AM
          0 responses
          5 views
          0 likes
          Last Post Option Whisperer  
          Started by halgo_boulder, 04-20-2024, 08:44 AM
          2 responses
          22 views
          0 likes
          Last Post halgo_boulder  
          Started by mishhh, 05-25-2010, 08:54 AM
          19 responses
          6,189 views
          0 likes
          Last Post rene69851  
          Working...
          X