title: MQL4 - one order per day
body: <p>I would like to write out a boolean that returns <code>false</code> if the last order (<code>close</code>) has been performed less than 24 hours earlier.</p>
  
  <p>I tried with this code, but it always returns <code>false</code>:</p>
  
  <pre><code>bool OnePerDay()
  {
       if (  OrderSelect( 1, SELECT_BY_POS, MODE_HISTORY ) )
       {     
  
             if (  OrderOpenTime() &lt;  24*60*60 ) return( true );
       }
       return( false );
  }
  </code></pre>
  
  <p>My goal is to perform at least one trade per day (or other time interval), so it should open a position and close it, but not perform other orders in less than 24 hours after.</p>