Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bid and ask size

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

    Bid and ask size

    I would like to plot bid/ask size into the chart.
    I downloaded two indicators, one to plot the bid size, one ask size.
    Unfortunately it has a few issues: (1) no historical bid/ask size couldn't be plotted. (2) The values couldn't update in real time, i.e. the values couldn't update as long as the bid/ask size changes.

    The problem seems to lie on the code because it uses OnBarUpdate() which is wrong for such kinds of data. The ask size code:
    Code:
            protected override void OnBarUpdate()
            {
                if (Historical)
                    return;
                
                AskSize0.Set(GetCurrentAskVolume());
            }
    
            #region Properties
            [Browsable(false)]    // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
            [XmlIgnore()]        // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
            public DataSeries AskSize0
            {
                get { return Values[0]; }
            }
    
            #endregion
    The indicator should use "OnMarketData()".

    I believe it only takes one line or two to achieve it but I have nearly zero programming knowledge. I tried to guess "the right code" for several days but failed miserably.

    What should I change in order to use "OnMarketData()"?
    Could anyone kindly tell me?
    Thanks a lot.
    Attached Files

    #2
    Hi Profitmake,

    I see you have already discussed this request on another thread.


    Unfortunately, we cannot custom code this for you.
    TimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    595 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
    554 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X