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 Hwop38, 05-04-2026, 07:02 PM
            0 responses
            161 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Started by CaptainJack, 04-24-2026, 11:07 PM
            0 responses
            309 views
            0 likes
            Last Post CaptainJack  
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            245 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            349 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            179 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Working...
            X