Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error:HistBackfill on TDA SP 500

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

    Error:HistBackfill on TDA SP 500

    I started receiving a data acquisition error on a strategy that contains the secondary instrument S&P 500.
    Add("^SP500", PeriodType.Day, 1);

    The error is:
    ERROR: HISTBACKFILL "$SPX.X" Dta acquisition failed for 1 of 1 requests.Error retrieving data.

    This only occurs with TD Ameritrade, the strategy works fine with Yahoo daily data.

    In TDA, this message is displayed on a S&P 500 chart:
    The symbol you entered, $INX, changed to $SP.X.

    Seems like a symbol change from "SPX.X" to "SP.X" occurred.
    If so, can I change the instrument mapping bewween NT and TDA?

    If not, any ideas on a resolution (I've tried clearing all historical data and compacting the db, but no change.

    - Fred

    #2
    Fred, thanks for the post - to change the mapping please go to Tools > Instrument Manager and find the SP500 symbol in the middle master list. Then click on 'Edit' and change the mapping for TDA then under the 'Misc' tab to the $SP.X
    BertrandNinjaTrader Customer Service

    Comment


      #3
      I went to the Instrument Manager as directed.
      After changing the TDA mapping in '^SP500' to 'SP.X' it errored on Save"
      'The Master Instrument Name can only hold letters, numbers and underscore'

      So I changed the Master Instrument name to 'SP500' and saved successfully.

      I also changed the Indicator code to match:
      Add("SP500", PeriodType.Day, 1);

      The code then errored:
      'The strategy 'MySP500StrategyPlot' has called the Add() method with an invalid instrument. Either 'SP500' does not exist in the Instrument Manager or the specified exchange has not been configured.'

      The previous code works:
      Add("^SP500", PeriodType.Day, 1);

      A regular chart behaves the same way, erroring with 'SP500' but succeeding with '^SP500'

      Is this expected behavior to define a Master Instrument and then prepend a '^' character to reference it in the Gui and Code?

      Comment


        #4
        fwalton, so you get the needed data from TDA successfully now? Yes this is expected, just add the SP500 to your default list in the Instrument Manager, it will use the ^SP500 notation then.
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by DJ888, Today, 10:57 PM
        0 responses
        2 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by MacDad, 02-25-2024, 11:48 PM
        7 responses
        158 views
        0 likes
        Last Post loganjarosz123  
        Started by Belfortbucks, Today, 09:29 PM
        0 responses
        7 views
        0 likes
        Last Post Belfortbucks  
        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
        151 views
        0 likes
        Last Post rehmans
        by rehmans
         
        Working...
        X