Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

variable int for data series

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

    variable int for data series

    hi,

    Trying to add a secondary data series that can be altered outside the code in the backtest or optimize windows. The below compiles but errors on execution

    Add(PeriodType.Minute,time);

    where time is a private int

    privateint time = 30;


    Error i recieve in output window.

    **NT** Error on getting/setting property 'Time' for strategy 'BollRSIMultiTime/8263488a1cce4d20b41326a4ec3eaf96': Object of type 'NinjaTrader.Indicator.TimeSeriesHelper' cannot be converted to type 'System.Int32'.


    Cheers

    #2
    Actually i've just found the issue.

    I cant use "time" as it is already a hard coded term, so i've used utime. It's running so will see if that actually allows the different variable to be used for the time.

    Cheers

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    67 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    150 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    162 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    99 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    286 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X