EA that opens sell position regularly

 

Hi all,

I'm new here and also with programming mt4 EA.

I would like to create a EA that performs following task:

-Open a new sell position every minute.

-After x sell position opened, the new ones are opened every 15 minutes; The total of sell positions that can be opened should be defined as input.

-Each new sell positon is opened with increased lot size (e.g. starting with 0.01 then 0.03, 0.03, 0.05,...). The initial lot should be defined as input.

-The T/P should be set and adjusted based on the size of the orders that are opened.


I would be grateful if someone could help me with it, or at least guide me, where to start with.


Thanks in advance,

best regards,

Olivier

 
Olivier: I would be grateful if someone could help me with it, or at least guide me, where to start with.

Help you with what? You haven't stated a problem, you stated a want.
     How To Ask Questions The Smart Way. 2004
          Prune pointless queries.

You have only four choices:

  1. Search for it. Do you expect us to do your research for you?

  2. Beg at:

  3. MT4: Learn to code it.
    MT5: Begin learning to code it.

    If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into your code.

  4. or pay (Freelance) someone to code it. Top of every page is the link Code Base.
              Hiring to write script - General - MQL5 programming forum 2019.08.21

We're not going to code it for you (although it could happen if you are lucky or the problem is interesting.) We are willing to help you when you post your attempt (using CODE button) and state the nature of your problem.
          No free help 2017.04.21

 

Hi William,

Thank you for your reply, you gave me the motivation to start from the beginning by myself and it is now working like expected :) This forum is full of information !!

Just one question, what is the difference between  void OnStart() and void OnInit() ? (I used void OnTick())

I assume, that both are executed at EA start, but is there a difference ? For example, can a function set in void OnStart() be executed while EA is running ?

 
void OnStart() is used in scripts not in EAs.
Reason: