• 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 joemiller, Today, 07:33 AM
    0 responses
    6 views
    0 likes
    Last Post joemiller  
    Started by isnercrypto, Today, 06:42 AM
    0 responses
    4 views
    0 likes
    Last Post isnercrypto  
    Started by Coursocied67, Today, 04:02 AM
    0 responses
    5 views
    0 likes
    Last Post Coursocied67  
    Started by TheGameOfProbabilities, 07-18-2019, 06:56 AM
    7 responses
    37 views
    0 likes
    Last Post DaveS
    by DaveS
     
    Started by claxxical, Yesterday, 10:00 PM
    0 responses
    11 views
    0 likes
    Last Post claxxical  
    Working...
    X