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 wzgy0920, 04-20-2024, 06:09 PM
    2 responses
    26 views
    0 likes
    Last Post wzgy0920  
    Started by wzgy0920, 02-22-2024, 01:11 AM
    5 responses
    32 views
    0 likes
    Last Post wzgy0920  
    Started by wzgy0920, Yesterday, 09:53 PM
    2 responses
    49 views
    0 likes
    Last Post wzgy0920  
    Started by Kensonprib, 04-28-2021, 10:11 AM
    5 responses
    192 views
    0 likes
    Last Post Hasadafa  
    Started by GussJ, 03-04-2020, 03:11 PM
    11 responses
    3,234 views
    0 likes
    Last Post xiinteractive  
    Working...
    X