Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

toTime

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

    toTime

    I am trying to get the close at 4:15 EST on a 24/7 chart

    my indicator compiles successfully and my code is:

    if (ToTime(Time[0])== ToTime(16, 15, 0))
    {
    myclose = Close[0];
    }

    I also tried:
    if (ToTime(Time[0])== 161500)
    {
    myclose = Close[0];
    }

    However both produce a value of Zero.

    Where am I going wrong?
    Last edited by velocity; 12-24-2009, 09:15 AM.

    #2
    Hi Velocity,

    Thank you for your post.

    The syntax looks good. One thing to check is that your charts bar interval produces a time stamp for 1615. For example if you're looking at six or ten minute bars you wouldn't see a bar for 1615. If you have Session Begins in chart properties on an odd number then this also wouldn't produce a 1615 bar.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      thanks for the response

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      222 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      138 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      154 views
      1 like
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      237 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      195 views
      0 likes
      Last Post CarlTrading  
      Working...
      X