• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Time and sales information

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

  • ballboy11
    started a topic Time and sales information

    Time and sales information

    Does Ninjatrader keep track of time and sales information or is it just and ouptut on the time and sales window?

  • NinjaTrader_ChelseaB
    replied
    Hello ballboy11,

    Thank you for the post.

    The T&S data is aggregated tick market data. To aggregate your own, add a one tick Ask and one tick Bid data series to the script. Then get the time stamp of each of those ticks.

    Initalize(){
    //
    //Add(string instrumentName, PeriodType periodType, int period, MarketDataType marketDataType)
    Add("ES 12-17", PeriodType.Tick, 1, MarketDataType.Ask);
    Add("ES 12-17", PeriodType.Tick, 1, MarketDataType.Bid);

    }

    protected override void OnBarUpdate()
    {

    if (BarsInProgress == 1)
    {
    Print("Ask" + Close[0]);
    }

    if (BarsInProgress == 2)
    {
    Print("Bid" + Close[0]);
    }
    }

    Please see the following links for more information:

    BarsInProgress:
    https://ninjatrader.com/support/help...inprogress.htm

    Please let us know if we may be of any further assistance.
    https://ninjatrader.com/support/foru...390#post522390

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by pjsmith, Today, 08:14 AM
0 responses
5 views
0 likes
Last Post pjsmith
by pjsmith
 
Started by levikNT, Today, 07:36 AM
1 response
10 views
0 likes
Last Post NinjaTrader_ChristopherD  
Started by TazoTodua, Today, 07:27 AM
1 response
4 views
0 likes
Last Post NinjaTrader_JoshG  
Started by KennyK, Yesterday, 09:47 PM
1 response
6 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by Dogmatichacker, Yesterday, 03:52 PM
1 response
15 views
0 likes
Last Post NinjaTrader_ChelseaB  
Working...
X