When in doubt, think!
static datetime lastTrade=0; datetime now=TimeCurrent(); if(now - lastTrade >= 3600){ // Only once per hour. lastTrade=now; OrderSend(…); }
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.
- 2020.08.21
- www.mql5.com
I Wanted this EA to to buy and close at 20 ma crossings. Only buy when above 50 ma and ignore sells...
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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