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

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 r68cervera, Today, 05:29 AM
            0 responses
            2 views
            0 likes
            Last Post r68cervera  
            Started by geddyisodin, Today, 05:20 AM
            0 responses
            3 views
            0 likes
            Last Post geddyisodin  
            Started by JonesJoker, 04-22-2024, 12:23 PM
            6 responses
            33 views
            0 likes
            Last Post JonesJoker  
            Started by GussJ, 03-04-2020, 03:11 PM
            12 responses
            3,239 views
            0 likes
            Last Post Leafcutter  
            Started by AveryFlynn, Today, 04:57 AM
            0 responses
            6 views
            0 likes
            Last Post AveryFlynn  
            Working...
            X