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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      154 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      306 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      244 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      345 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      176 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X