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 actualfacts.2021, 07-25-2021, 03:11 PM
            8 responses
            1,182 views
            0 likes
            Last Post linkcou
            by linkcou
             
            Started by reynoldsn, Today, 07:11 PM
            0 responses
            2 views
            0 likes
            Last Post reynoldsn  
            Started by needsomehelp147, 04-29-2024, 06:43 AM
            2 responses
            19 views
            0 likes
            Last Post needsomehelp147  
            Started by sidlercom80, 10-28-2023, 08:49 AM
            177 responses
            2,400 views
            0 likes
            Last Post jeronymite  
            Started by algospoke, Today, 06:36 PM
            0 responses
            7 views
            0 likes
            Last Post algospoke  
            Working...
            X