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

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 drewski1980, Today, 08:24 AM
        0 responses
        3 views
        0 likes
        Last Post drewski1980  
        Started by rdtdale, Yesterday, 01:02 PM
        2 responses
        16 views
        0 likes
        Last Post rdtdale
        by rdtdale
         
        Started by TradeSaber, Today, 07:18 AM
        0 responses
        7 views
        0 likes
        Last Post TradeSaber  
        Started by PaulMohn, Today, 05:00 AM
        0 responses
        10 views
        0 likes
        Last Post PaulMohn  
        Started by ZenCortexAuCost, Today, 04:24 AM
        0 responses
        6 views
        0 likes
        Last Post ZenCortexAuCost  
        Working...
        X