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 rhyminkevin, Today, 04:58 PM
    3 responses
    47 views
    0 likes
    Last Post Anfedport  
    Started by iceman2018, Today, 05:07 PM
    0 responses
    5 views
    0 likes
    Last Post iceman2018  
    Started by lightsun47, Today, 03:51 PM
    0 responses
    7 views
    0 likes
    Last Post lightsun47  
    Started by 00nevest, Today, 02:27 PM
    1 response
    14 views
    0 likes
    Last Post 00nevest  
    Started by futtrader, 04-21-2024, 01:50 AM
    4 responses
    50 views
    0 likes
    Last Post futtrader  
    Working...
    X