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 llanqui, Today, 03:53 AM
    0 responses
    5 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    10 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    15 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Yesterday, 08:42 PM
    0 responses
    11 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Yesterday, 07:51 PM
    0 responses
    14 views
    0 likes
    Last Post strategist007  
    Working...
    X