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 CarlTrading, Yesterday, 11:51 AM
    0 responses
    12 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, Yesterday, 11:48 AM
    0 responses
    18 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-25-2026, 09:53 PM
    0 responses
    13 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 03-25-2026, 09:51 PM
    0 responses
    12 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 03-23-2026, 11:13 AM
    0 responses
    18 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X