Condition to only trade once per hour

William Roeder  
When in doubt, think!
static datetime lastTrade=0; datetime now=TimeCurrent();
if(now - lastTrade >= 3600){ // Only once per hour.
Vladimir Karputov  
Bat Man:

Hello, does someone know a condition to trade only once per hour in mql5, i'm a begginer and having trouble to find something that i can undestand.

Or some ressource to learn more about it

Thank you

Example:  One deal per bar

Learning to code. Need help with this.
Learning to code. Need help with this.
  • 2020.08.21
I Wanted this EA to to buy and close at 20 ma crossings. Only buy when above 50 ma and ignore sells...