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 mattbsea, Today, 05:44 PM
    0 responses
    3 views
    0 likes
    Last Post mattbsea  
    Started by RideMe, 04-07-2024, 04:54 PM
    6 responses
    31 views
    0 likes
    Last Post RideMe
    by RideMe
     
    Started by tkaboris, Today, 05:13 PM
    0 responses
    2 views
    0 likes
    Last Post tkaboris  
    Started by GussJ, 03-04-2020, 03:11 PM
    16 responses
    3,282 views
    0 likes
    Last Post Leafcutter  
    Started by WHICKED, Today, 12:45 PM
    2 responses
    20 views
    0 likes
    Last Post WHICKED
    by WHICKED
     
    Working...
    X