Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Disable Strategy at Specified Time

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

    Disable Strategy at Specified Time

    I'd like to know how to disable my active strategy at a specific time. I'm using the following code but is failing to disable the strategy.


    if (ToTime(Time[0]) >= ToTime(15,10,00))
    {
    Disable();
    }



    Thanks.

    #2
    Hi Mike, which chart type and interval are you running this code on? Have you checked with a Print statement or drawing action for visualizatin that the condition triggers for the disable?

    Comment


      #3
      Originally posted by Mikefra View Post
      I'd like to know how to disable my active strategy at a specific time. I'm using the following code but is failing to disable the strategy.


      if (ToTime(Time[0]) >= ToTime(15,10,00))
      {
      Disable();
      }



      Thanks.
      Why not just do it like this

      if(ToTime(Time[0]) >= 151000)
      {
      Disable();
      }

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, Yesterday, 11:51 AM
      0 responses
      17 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, Yesterday, 11:48 AM
      0 responses
      21 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-25-2026, 09:53 PM
      0 responses
      17 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 03-25-2026, 09:51 PM
      0 responses
      13 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 03-23-2026, 11:13 AM
      0 responses
      20 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X