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

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.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by zstheorist, Today, 07:52 PM
    0 responses
    7 views
    0 likes
    Last Post zstheorist  
    Started by pmachiraju, 11-01-2023, 04:46 AM
    8 responses
    150 views
    0 likes
    Last Post rehmans
    by rehmans
     
    Started by mattbsea, Today, 05:44 PM
    0 responses
    6 views
    0 likes
    Last Post mattbsea  
    Started by RideMe, 04-07-2024, 04:54 PM
    6 responses
    33 views
    0 likes
    Last Post RideMe
    by RideMe
     
    Started by tkaboris, Today, 05:13 PM
    0 responses
    6 views
    0 likes
    Last Post tkaboris  
    Working...
    X