|
Use this:
First put this up at the top:
int DayOfLastTrade;
Then where you are sending your order in, put this around it:
if (TimeDayOfYear(TimeCurrent())!=DayOfLastTrade)
{
ticket=OrderSend(....
DayOfLastTrade=(TimeDayOfYear(TimeCurrent());
}
That should only allow it to make one trade per day. Hope that is what you wanted.
|