Announcement

Collapse
No announcement yet.

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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    72 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    39 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    63 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    63 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    53 views
    0 likes
    Last Post CarlTrading  
    Working...
    X