Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to code time?

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

    How to code time?

    How Can I code my strategy to stop trading my 3:30pm EST to 6:30pm EST?

    #2
    Hello priceisking,

    Thank you for the post.

    Please see this reference sample that shows how to limit trading hours:



    Please let me know if I can assist further.

    Comment


      #3
      Originally posted by priceisking View Post
      How Can I code my strategy to stop trading my 3:30pm EST to 6:30pm EST?
      Hi, i have a same Question. you can setup it?

      Comment


        #4
        Hello andarbe,

        Thanks for the post.

        You can use this bit of code at the top of your OnBarUpdate method.

        Code:
        if ((ToTime(Time[0]) >= 153000 && (ToTime(Time[0]) <= 183000)))
            return;
        Please let me know if I can assist further.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        52 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        130 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        70 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        44 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        48 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X