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

Convert Multi-TF Strategy using Tick Replay To test with SA Historical Bid/Ask ?

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

    Convert Multi-TF Strategy using Tick Replay To test with SA Historical Bid/Ask ?

    Hello Support

    I've developed a Multi-timeframe strategy using Tick Replay. Works great.

    It only references 1 instrument at a time, but with multi-timeframes and uses these dataseries.
    AddDataSeries(Data.BarsPeriodType.Minute, 1);
    AddDataSeries(Data.BarsPeriodType.Minute, 3);
    AddDataSeries(Data.BarsPeriodType.Minute, 5);

    It calculates On.PriceChange and uses GetCurrentBid() & GetCurrentAsk().

    I need to test this strategy using Historical Bid/Ask using Strategy Analyzer with Optimization.

    I've been reading thru help I can't find "steps or howto's".

    Is there a Sample that I can look at in HELP ?

    For example, How can I add a dataseries's for Historical Bid & Ask for the "primary" instrument ?

    https://ninjatrader.com/support/help..._ask_serie.htm
    // Add an AAPL data series using the Ask series
    AddDataSeries("AAPL", BarsPeriodType.Minute, 30, MarketDataType.Ask);

    ONLY works to add MarketDataType.Ask of another instrument and not the primary.

    Please help.

    Thanks in advance.

    #2
    Hello rayko, thanks for writing in.

    Depending on the data feed you are using, some data providers do not give historical minute bid/ask data. e.g. Kinetick will not let you load a minute based ask or bid series but NinjaTrader Continuum does. You can check if your data feed supports this from this page:

    https://ninjatrader.com/support/help...y_provider.htm

    You can do this to add a data series of the same type as the primary series:

    Code:
    AddDataSeries(Instrument.FullName, Bars.BarsPeriod.BarsPeriodType, Bars.BarsPeriod.Value, MarketDataType.Ask);
    AddDataSeries(Instrument.FullName, Bars.BarsPeriod.BarsPeriodType, Bars.BarsPeriod.Value, MarketDataType.Bid);
    Please let me know if I can assist any further.
    Chris L.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by DavidHP, Today, 07:56 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by kujista, Today, 06:23 AM
    3 responses
    9 views
    0 likes
    Last Post kujista
    by kujista
     
    Started by Mindset, Yesterday, 02:04 AM
    2 responses
    18 views
    0 likes
    Last Post NinjaTrader_RyanS  
    Started by f.saeidi, Today, 08:03 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by samish18, 04-17-2024, 08:57 AM
    15 responses
    53 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Working...
    X