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 LiamTwine, Today, 08:10 AM
    0 responses
    2 views
    0 likes
    Last Post LiamTwine  
    Started by Balage0922, Today, 07:38 AM
    0 responses
    5 views
    0 likes
    Last Post Balage0922  
    Started by JoMoon2024, Today, 06:56 AM
    0 responses
    6 views
    0 likes
    Last Post JoMoon2024  
    Started by Haiasi, 04-25-2024, 06:53 PM
    2 responses
    19 views
    0 likes
    Last Post Massinisa  
    Started by Creamers, Today, 05:32 AM
    0 responses
    6 views
    0 likes
    Last Post Creamers  
    Working...
    X