Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adding Multiple Time Frame ##-##

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

    Adding Multiple Time Frame ##-##

    Hey Guys,

    I ran into a issue adding cont contract as a multiple time-frame


    if the State.SetDefaults

    Code:
     ContractDate 				= "##-##";
    in the State.Configure

    Code:
    AddPointAndFigure(Instrument.MasterInstrument.Name.ToString()+" "+ContractDate,BarsPeriodType.Minute,1,Secondary_BoxSize,3,PointAndFigurePriceType.Close, MarketDataType.Last);
    Properties
    Code:
    [Range(1, int.MaxValue)]
    		[NinjaScriptProperty]
    		[Display(Name="Contract_Date", Order=1, GroupName="Parameters")]
    		public string ContractDate
    		{ get; set; }
    See the attached image for the error.

    In NT7 this worked perfectly to add a dataseries, in NT8 I am getting a error that it has to be a number..

    if this a error or do you know of a solution?

    Cheers,

    Sody
    Attached Files

    #2
    yes, this
    >>> [Range(1, int.MaxValue)]
    ... does not make sense on a 'string' property

    Comment


      #3
      Whoops, so this would be considered a user error not a NT8 error.. How did I miss that, lol... works perfectly.

      Comment


        #4
        Glad it's resolved for you.

        Comment


          #5
          These properties are new to NT8, is there a section in the manual that describes these properties?

          Comment


            #6
            This is on my list to have added to help guide and mention in code breaking changes in the near future.
            MatthewNinjaTrader Product Management

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by kinfxhk, 07-13-2026, 10:18 AM
            0 responses
            28 views
            0 likes
            Last Post kinfxhk
            by kinfxhk
             
            Started by kinfxhk, 07-13-2026, 09:50 AM
            0 responses
            18 views
            0 likes
            Last Post kinfxhk
            by kinfxhk
             
            Started by kinfxhk, 07-13-2026, 07:21 AM
            0 responses
            28 views
            0 likes
            Last Post kinfxhk
            by kinfxhk
             
            Started by kinfxhk, 07-11-2026, 02:11 AM
            0 responses
            24 views
            0 likes
            Last Post kinfxhk
            by kinfxhk
             
            Started by SalmaTrader, 07-07-2026, 10:26 PM
            0 responses
            139 views
            0 likes
            Last Post SalmaTrader  
            Working...
            X