Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ask bid last ticks count

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

    ask bid last ticks count

    hello,
    i understend that NT is runing the indicator/strategy script only by the "last" tick (and not by ask/bid/last)

    i like to make a counter for all the ask bid last ticks,

    is it posible to run the indicator/strategy on all ticks?
    if not, is it posible to make only counter for all ask bid last ticks? (and still run the script by the last tick?

    p.s im not sure what the different from "ask/bid" to "last" tick, so if u can clarify it that will be great too

    tnx
    tom.

    #2
    Hello Tom,

    Thank you for writing in and thank you for your patience. This is possible using the OnMarketData method in NinjaTrader. More information on the OnMarketData method can be found in our help guide here: http://ninjatrader.com/support/helpG...b=onmarketdata

    As an example:
    Code:
    protected override void OnMarketData(MarketDataEventArgs e)
    {
        switch(e.MarketDataType)
        {
            case MarketDataType.Last:
                Print("Last: " + e.Price);
                break;
            case MarketDataType.Bid:
                Print("Bid: " + e.Price);
                break;
            case MarketDataType.Ask:
                Print("Ask: " + e.Price);
                break;
        }
    }
    The difference between the ask/bid and last is that the last is simply the last traded price. At any given time it may be the same as either the ask or the bid price.

    Please let me know if I may be of further assistance.
    Michael M.NinjaTrader Quality Assurance

    Comment


      #3
      tnx,
      so if u get it right, the ask-bid will cover all the ticks that the broker provide, the "last" is just one of them (ask or bid)

      Comment


        #4
        Hello tomas1983,

        This is correct. Please let me know if you have any further questions.
        Michael M.NinjaTrader Quality Assurance

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        581 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        338 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
        554 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        552 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X