Pass Wait then Pass

0 Views
0 Downloads
0 Favorites
Pass Wait then Pass
input int count = 50; // Set the counting limit as an input
input int wait = 50; // Set the waiting limit as an input

int Counter; // counter variable default value is "0"
int Waiter; // Waiting variable default value is "0"

// Expert Initializing --------------------
int OnInit()
  {
   return(INIT_SUCCEEDED);
  }

// Expert DeInitializing -------------------
void OnDeinit(const int reason)
  {

  }

// Expert OnTick --------------------------
void OnTick()
  {
   Comment("Counted Ticks -: ", Counter, "\n", "Waited Ticks -: ", Waiter);

   if(Counter < count) // Pass "X" times
     {
      Counter++; // update the counter

      // Your code goes here.

     }
   else
      if(Waiter < wait) // Wait for "X" times
        {
         Waiter++; // update the waiter

         // Your code goes here.

        }

   if(Waiter == wait) // Waiting Limit is reached
     {
      Counter = 0; // reset counter
      Waiter = 0; // reset waiter
     }






  } // OnTick End  <<----------------------
//+------------------------------------------------------------------+

Comments

Markdown supported. Formatting help

Markdown Formatting Guide

Element Markdown Syntax
Heading # H1
## H2
### H3
Bold **bold text**
Italic *italicized text*
Link [title](https://www.example.com)
Image ![alt text](image.jpg)
Code `code`
Code Block ```
code block
```
Quote > blockquote
Unordered List - Item 1
- Item 2
Ordered List 1. First item
2. Second item
Horizontal Rule ---