Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Print value but no plot

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

    Print value but no plot

    Hi,

    I am trying to create DeltaBidAsk Momentum indicator, and met strange behavior. Indi prints proper values but do not plot them all the time. See attachement.

    I would be grateful for any advice.

    Cheers
    Attached Files

    #2
    Kowal, I'm not sure exactly what wasn't working right, but I've made a few minor changes to your code and it seems to plot correctly. There are no missing bars. I have a feeling it had to do with not setting a plot on every bar. Please take a look at the attached code and let me know if you have any other questions.
    Attached Files
    AustinNinjaTrader Customer Service

    Comment


      #3
      Quick update. Just noticed its working fine with minute, ticks and range chart. Problem appears only with volume chart.

      Comment


        #4
        Austin,

        thanks for such quick respond! however...problem persist. Even after Your changes it does not correctly plot on volume chart still. Other chart types work fine.
        Odd.

        Comment


          #5
          Kowal, I just clarified with a coworker and it is not supported to plot from inside the OnMarketData() method. You can set variables and such but then you need to plot from inside OnBarUpdate().
          Code:
          OnBarUpdate()
          {
              up_plot.set(momentum);
          }
          OnMarketData()
          {
              momentum = some_value;
          }
          In the attached indicator I just copied + pasted the plot section into the OnBarUpdate() method so it might not be 100% correct with regards to the indicator you're trying to create, but it will get you going in the right direction.
          Attached Files
          AustinNinjaTrader Customer Service

          Comment


            #6
            Fantastic!, Austin. Its working now.

            Thank You so much.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            597 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            343 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            556 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            555 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X