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

Dynamically loading an Additional Series

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

    Dynamically loading an Additional Series

    I discovered it's not permitted and tried to get around it by doing this in State.Configure thinking perhaps at least make a choice about it once but no, that's not permitted either. I'm guessing the only way would be to load all choices and then use a specific one in a switch statement in OnBarUpload then?

    switch (htFrame)
    {
    case 1:
    AddDataSeries(Data.BarsPeriodType.Minute, 15);
    break;
    case 2:
    AddDataSeries(Data.BarsPeriodType.Minute, 30);
    break;
    case 3:
    AddDataSeries(Data.BarsPeriodType.Minute, 45);
    break;
    case 4:
    AddDataSeries(Data.BarsPeriodType.Minute, 60);
    break;
    case 5:
    AddDataSeries(Data.BarsPeriodType.Minute, 120);
    break;
    case 6:
    AddDataSeries(Data.BarsPeriodType.Minute, 180);
    break;
    case 7:
    AddDataSeries(Data.BarsPeriodType.Minute, 240);
    break;
    default:
    AddDataSeries(Data.BarsPeriodType.Minute, 60);
    break;
    }​

    #2
    Hi markdshark, thanks for posting. It is possible to make this a user configurable option, it would just not work well when using the strategy analyzer. See the "Correlation" indicator in the indicators folder for an example on using user input for this method.

    Kind regards,
    =ChrisL
    Chris L.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by geddyisodin, 04-25-2024, 05:20 AM
    8 responses
    58 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by jxs_xrj, 01-12-2020, 09:49 AM
    4 responses
    3,285 views
    1 like
    Last Post jgualdronc  
    Started by Option Whisperer, Today, 09:55 AM
    0 responses
    5 views
    0 likes
    Last Post Option Whisperer  
    Started by halgo_boulder, 04-20-2024, 08:44 AM
    2 responses
    22 views
    0 likes
    Last Post halgo_boulder  
    Started by mishhh, 05-25-2010, 08:54 AM
    19 responses
    6,189 views
    0 likes
    Last Post rene69851  
    Working...
    X