Simple question about coding a robot

 

Hello eveyrone (and merry christmas !)

 

I'm really starting with mt5, so I don't have much knowledge. I guess it will appear as a very basic question, but here it is:

Let's say I want to create a robot which will will automatically buy EURUSD and then sell it after 1 hour. And then repeat that. How do I do that? Is there some kind of timer that will go off as soon as it buys EURUSD? Or should I implement (and how) some kind of order, like "buy at 3pm, sell at 4pm, etc..."?

 

Thanks a lot ! 

 
johnE:

Hello eveyrone (and merry christmas !)

 

I'm really starting with mt5, so I don't have much knowledge. I guess it will appear as a very basic question, but here it is:

Let's say I want to create a robot which will will automatically buy EURUSD and then sell it after 1 hour. And then repeat that. How do I do that? Is there some kind of timer that will go off as soon as it buys EURUSD? Or should I implement (and how) some kind of order, like "buy at 3pm, sell at 4pm, etc..."?

 

Thanks a lot ! 

Hi John,

The exciting thing about coding...is you can have either or both strategies placed in your code...

The key here is - being as exact and detailed as possible about describing your "conditions to Buy/Sell".

The clearer you can define these Buy/Sell conditions, the easier it will be to code into your EA...

I'm an intermediate MT4 coder and a novice MT5 coder...

My experience is that the MT4 code is much simpler to study and learn from...and you can find many good MT4 EA examples in the MT4 codebase to help you learn...some even already have the conditions you asked about.

Then you can learn from it and work on coding it into an MT5 EA.

There are also stand alone coding programs that can help new learners get faster results in developing your EA's.

The free one is an EA template you see a lot - Expert Adviser Builder Template - do a search for it.

The two best for fee ones are:

1) EA Tree

2) Molanis EA Builder

I have both that work great...and both offer different approaches to build and learn from the EA...

Hope this helps,

Robert









Reason: