• 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

At Bid or at Ask?

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

    At Bid or at Ask?

    Hi there

    I added a 1 tick series to my indicator. I know how to get the price (close[0]) and the volume (volume[0]) of each tick. how do I find out, whether it was executed at the bid or ask price? getcurrentbid() substitutes the close price as it seems in case of historical data...

    thanks!
    Chris

    #2
    Hello Chris,

    Thank you for your post.

    You can add an additional series to your script for the Bid and Ask, you would then need to access that Bar Series to compare against the primary.

    To add the additional series in the Initialize() method please use the following as an example:
    Code:
    			Add("AAPL", PeriodType.Tick, 1, MarketDataType.Bid);
    			Add("AAPL", PeriodType.Tick, 1, MarketDataType.Ask);
    For information on historical bid and ask series please visit the following link: http://www.ninjatrader.com/support/h..._ask_serie.htm
    For information on multiple time frames in your code please visit the following link: http://www.ninjatrader.com/support/h...nstruments.htm

    Please let me know if I may be of further assistance.
    Patrick H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Irukandji, 06-10-2019, 06:13 AM
    3 responses
    34 views
    0 likes
    Last Post Alfred
    by Alfred
     
    Started by Uwe1981, Today, 03:41 AM
    1 response
    15 views
    0 likes
    Last Post NinjaTrader_Kate  
    Started by 7robert, Today, 10:07 AM
    0 responses
    2 views
    0 likes
    Last Post 7robert
    by 7robert
     
    Started by emuns, Today, 09:36 AM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Started by lmatiukas, Today, 09:31 AM
    0 responses
    4 views
    0 likes
    Last Post lmatiukas  
    Working...
    X