MQL4 - automated forex trading   /  

Forum

is it possible to create automated trading system with time basis?

Back to topics list To post a new topic, please log in or register

avatar
2
setyo 2006.11.16 19:02 
i need a help here. can we make an automated trading system on metatrader platform with time basis and 15 pips stop loss?

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....
article

Video interview with Rashid Umarov

The main conclusion is that it is insufficient to have a profitable strategy: it is necessary to strengthen its advantages and smooth its disadvantages. This is the point in money management: You should gain the largest profit from your approach, your Expert Advisor, your system with minimal risk and in maximal amounts, without being short of it. This is the most important thing, to my mind.


avatar
61
tradermaji 2006.11.16 19:04 
yes, you can do that.

avatar
2
setyo 2006.11.16 19:10 
tradermaji wrote:
yes, you can do that.
can you help me with that?

avatar
61
tradermaji 2006.11.17 08:36 
setyo wrote:
tradermaji wrote:
yes, you can do that.
can you help me with 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.

avatar
1072
RickD 2006.11.22 14:52 
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


avatar
17
forexfordinner 2006.11.22 20:32 
RickD wrote:
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.
Back to topics list  

To add comments, please log in or register