Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

TimeStamp Issue !!!

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

    TimeStamp Issue !!!

    I am using NT 6.5 .14

    Here is my problem.

    TimeStamp is defined as a string.

    Here is the revelent code.

    private class LadderRow
    {

    public double Price;
    public int Volume;
    public string Time;



    public LadderRow(double myPrice, int myVolume, string myTime)
    {

    Price = myPrice;
    Volume = myVolume;
    Time = myTime;
    }

    -------------------------------------------------------------------
    else if (e.Operation == Operation.Update && e.Position < rows.Count)
    {

    rows[e.Position].Time = e.Time;
    rows[e.Position].Price = e.Price;
    rows[e.Position].Volume = e.Volume;

    }

    -----------------------------------------------------------------

    e,Time is a valid selection, see attachment.

    but when I compile, I get an error. CS0029.

    Can anyone explain this?

    Thanks,

    RJay
    Attached Files
    RJay
    NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

    #2
    RJay,
    I don't think e.Time is returned as a string, yet it was defined as such. Try e.Time.ToString. I haven't tried it, but I think that might be the issue.

    BTW, that will be code breaking in NT7, since e.Volume will be a long instead of an int

    VT

    Comment


      #3
      e.Time would be returned as DateTime, this why your code creates a compile issue.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by sjsj2732, Yesterday, 04:31 AM
      0 responses
      35 views
      0 likes
      Last Post sjsj2732  
      Started by NullPointStrategies, 03-13-2026, 05:17 AM
      0 responses
      286 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      286 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      133 views
      1 like
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      92 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Working...
      X