Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Two Times

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

    Two Times

    Hello:

    Please, How to put "two" time slots( 90000-110000 and 150000-170000).

    I have an example of a time slot.

    if (Totime (Time [0])> HoraSalida | | Totime (Time [0]) <HoraEntrada)
    {
    ExitShort ("", "");
    ExitLong ();
    return;
    }

    Thank you very much.

    #2
    Hello,

    If you wanted to place two time slots, you would want to check between these periods.

    Code:
    // if the current time is after 9, but before 11 OR if time is after 3, but before 5
      if (ToTime(Time[0])> 90000 && ToTime(Time[0]) < 110000 || ToTime(Time[0]) > 150000 && ToTime(Time[0]) < 170000)
            
    {
    ExitShort ("", "");
    ExitLong ();
    return;
    }
    MatthewNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    79 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    45 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    29 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    32 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    66 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X