greetings everyone. i have a small question:
what happens to the initialized variables inside function and main function, when the EA is running?
for example:
void start()
{
bool NewDay=false;
... if timecurrent==23:59
NewDay=True
NewDay = checkforTrade() //if an order is executed, "false" assigned to NewDay
...
return;
}
is flag set to false at every tick when the EA is running? or just once when the EA starts for the first time.
==================
what i am trying to do is trade one order per day. so i need a variable to flag a new day and then set to false throughout the day.
please, let me know if there is another trick to have only one trade per day.
thanks
what happens to the initialized variables inside function and main function, when the EA is running?
for example:
void start()
{
bool NewDay=false;
... if timecurrent==23:59
NewDay=True
NewDay = checkforTrade() //if an order is executed, "false" assigned to NewDay
...
return;
}
is flag set to false at every tick when the EA is running? or just once when the EA starts for the first time.
==================
what i am trying to do is trade one order per day. so i need a variable to flag a new day and then set to false throughout the day.
please, let me know if there is another trick to have only one trade per day.
thanks