Expert advisor, problem.

Back to topics list To post a new topic, please log in or register
avatar
1
m93 2015.12.26 18:44
 
I need a help, since I am not a programmer, I relied to a website to create my EA, unfortunately all is not well.
The first thing I ask is the following:

extern int MagicNumber = 10001;
extern double Lots = 0.1;
extern double StopLoss = 50;
extern double TakeProfit = 50;
TrailingStop extern int = 50;
extern int Slippage = 3;

I would put it as a parameter to STOP LOSS, not a predefined number but rather a parameter such as PRICE opening of the previous candle.
I tried to enter Low [shift1] but it is incorrect.

So the first aid I ask is how can I do to put a STOP LOSS "changeable" that varies with the candle?

The second request is:

  {
         result = OrderSend (Symbol (), OP_BUY, Lots, Ask, Slippage, 0,0, "EA Generator www.ForexEAdvisor.com" MagicNumber, 0, Blue);
         if (result> 0)
         {

The EA takes place when the conditions for the opening of the order, such as BUY, the program opens the order to BUY at current price, while I would like him to open a BUY STOP at a distance of pips, the closure of previous candle.
So instead of opening the order immediately, as I can do to put a pending order?

Third and final request:
I wish that the order was closed automatically once past a certain period of time, such as 4 hours.
In this case the site to create the EA does not provide quesa possibility and consequently do not know what to change.
I hope I was clear and that someone can help me.


avatar
12985
WHRoeder 2015.12.26 20:11 #
 
m93: I relied to a website to create my EA,
  • We hate EA builder
  • You couldn't be bothered to learn mql4, therefor there is no common language for us to communicate.
  • There are only two choices: learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem, but we are not going to debug your hundreds lines of code.
  • EA builder makes bad code counting up while closing multiple orders.
  • EA builder makes bad code Bars is unreliable (max bars on chart) volume is unreliable (miss ticks) Always use time
  • EA builder makes bad code Not adjusting for 4/5 digit brokers
  • EA builder makes bad code not adjusting for ECN brokers.
  • EA builder makes bad code not checking return codes.
  • EATree uses objects on chart to save values - not persistent storage (files or GV+Flush.) No recovery (crash/reboot.)
Back to topics list  

To add comments, please log in or register