yes, you can do that.
tradermaji:
yes, you can do that.
can you help me with that?
yes, you can do that.
I hate to sound like a commercial here, but I usually charge for writing EAs. If you have a specific system in mind, I probably can develop an EA for you based on that idea, but there will be a fee associated with that.
How to open a position at given time:
extern string OpenTime = "00:00"; extern int OpenPeriod = 10; datetime tm0 = StrToTime(TimeToStr(CurTime(), TIME_DATE) + " " + OpenTime); datetime tm1 = tm0 + OpenPeriod*60; if (CurTime() < tm0 || CurTime() > tm1) return; // Now we are opening a position
RickD wrote:
How to open a position at given time:
How to open a position at given time:
extern string OpenTime = "00:00"; extern int OpenPeriod = 10; datetime tm0 = StrToTime(TimeToStr(CurTime(), TIME_DATE) + " " + OpenTime); datetime tm1 = tm0 + OpenPeriod*60; if (CurTime() < tm0 || CurTime() > tm1) return; // Now we are opening a position
That is very good RickD. In addition, I´d place a bar counter given the desired time frame for work, so the EA wouldn´t open countless orders by the time 00:00. Other way would be to place a max ammount of opened orders. The advantage of the later is that you won´t have to wait for a new bar for opening a new order so with bar counting there will be only 1 order to place since 00:00 happens only once because mt4 goes as small a minute chart. Just bear that in mind if you intend to go for a longer period.

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
for example:
i want to trade eurousd on 08.00 GMT o'clock. so when the time is come (08.00 GMT), automatically i will have a trade (or some trades) and a stop loss order 15 pips (this 15 pips SL is of course also start from 08.00 GMT)
thanks....