Hello,
I am looking for some help (I'm strictly amateur) to code a way for and EA to look back at closed trades for a given symbol and turn itself off if it finds a profitable trade since the start of a new day (00:00 hrs). I've tried a the orderselect() mode_history function but cannot figure out a way for it to limit the list to just the current day.
I want to program my EA to shut itself off after it gets a profitable close (one drink at the well), yet keep going if it has a negative close. I was figuring to use the orderselect function and compare the orderprofit() with a constant integer. But again, I don't know how to make it look back for only the current day since midnight (server time).
Any ideas?
Thanks
Gerald Pajon
I am looking for some help (I'm strictly amateur) to code a way for and EA to look back at closed trades for a given symbol and turn itself off if it finds a profitable trade since the start of a new day (00:00 hrs). I've tried a the orderselect() mode_history function but cannot figure out a way for it to limit the list to just the current day.
I want to program my EA to shut itself off after it gets a profitable close (one drink at the well), yet keep going if it has a negative close. I was figuring to use the orderselect function and compare the orderprofit() with a constant integer. But again, I don't know how to make it look back for only the current day since midnight (server time).
Any ideas?
Thanks
Gerald Pajon