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 rbeckmann05, Yesterday, 06:48 PM
          1 response
          12 views
          0 likes
          Last Post bltdavid  
          Started by llanqui, Today, 03:53 AM
          0 responses
          6 views
          0 likes
          Last Post llanqui
          by llanqui
           
          Started by burtoninlondon, Today, 12:38 AM
          0 responses
          10 views
          0 likes
          Last Post burtoninlondon  
          Started by AaronKoRn, Yesterday, 09:49 PM
          0 responses
          15 views
          0 likes
          Last Post AaronKoRn  
          Started by carnitron, Yesterday, 08:42 PM
          0 responses
          11 views
          0 likes
          Last Post carnitron  
          Working...
          X