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 josh18955, 03-25-2023, 11:16 AM
          6 responses
          436 views
          0 likes
          Last Post Delerium  
          Started by FAQtrader, Today, 03:35 PM
          0 responses
          5 views
          0 likes
          Last Post FAQtrader  
          Started by rocketman7, Today, 09:41 AM
          5 responses
          18 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by frslvr, 04-11-2024, 07:26 AM
          9 responses
          127 views
          1 like
          Last Post caryc123  
          Started by selu72, Today, 02:01 PM
          1 response
          14 views
          0 likes
          Last Post NinjaTrader_Zachary  
          Working...
          X