if u put the EA on 1H TF chart
if (Fun_New_Bar()) { OrderSend(......); } bool Fun_New_Bar() { static datetime New_Time = 0; bool New_Bar = false; if (New_Time!= Time[0]) { New_Time = Time[0]; New_Bar = true; } return(New_Bar); }
if u don't use 1H TF chart then:
if (Fun_New_Bar()) { OrderSend(......); } bool Fun_New_Bar() { static datetime New_Time = 0; bool New_Bar = false; if (New_Time!= iTime(NULL,PERIOD_H1,0)) { New_Time = iTime(NULL,PERIOD_H1,0); New_Bar = true; } return(New_Bar); }
OrderSend(....);
without any condition is gonna open every tick
qjol:
without any condition is gonna open every tick
without any condition is gonna open every tick
instead of every tick, how to go about for every second?
can u explain please what u r trying to accomplish
qjol:
can u explain please what u r trying to accomplish
want to see mt4 place an order every second? Any idea how to code?
int i = 1; while (i != 0) { OrderSend(....); Sleep(1000); }
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
How to use place an order at the beginning of every second (regardless of price)?
Sound simple? But I just cannot figure out how to do it?
Should I use date and time functions?
How?
Thanks in advance!