Programmer wanted for reliable EA with error handling

 

I am looking for an EXPERIENCED professional programmer to redo (or finish) my EA. The current EA is working fine ……. until the connection to the server is lost or timed out, etc. etc. (One time I lost 50% of my capital overnight (luckily in demo) due to a bug creating an excessive number of 'open orders' 'owned' by the EA, both active and pending.)

So the main job is not to create the logic, although you may decide that you need to redo it for one reason or another, the main job is to create a RELIABLE code under real life execution, in other words, code with proper ERROR HANDLING for anything that can come up during unattended live trading.

The code is a Martingale type logic with a simple random entry (for the purpose of this test), so it is fairly straight forward therefore I don’t expect it to be a problem for you. The challenge starts when we get to the testing phase.

Here is my test plan:
First we test the core logic, just to make sure, the program doesn’t have basic logic errors.
Then we test the program for 120 unattended trades (about 2 weeks). The program has to handle the various trade disruptions successfully before I declare success. I.e., it can’t loose the place in the logic, it has to recover gracefully from timeout, weekend re-restart, etc. etc.

We will test it together, and each time there is an error (like in the examples below), I will give you a similar feedback:

2009.08.07 07:12:31 YYYYExit EURUSD,H1: Pending sell failed
2009.08.07 07:12:31 YYYYExit EURUSD,H1: last error: 128:trade timeout
2009.08.07 07:12:31 YYYYExit EURUSD,H1: failed trade: OP_SELLSTOP EURUSD@1.42570000 tp@1.42070000 sl@1.42670000
2009.08.07 07:12:31 YYYYExit EURUSD,H1: failed to execute stop or limit order after 1 retries
2009.08.07 07:12:31 YYYYExit EURUSD,H1: non-retryable error: 128:trade timeout
2009.08.07 07:09:44 YYYYExit EURUSD,H1: retryable error (1/10): 6:no connection with trade server
2009.08.07 07:09:44 stdlib EURUSD,H1: loaded successfully
2009.08.07 07:07:36 YYYYExit EURUSD,H1: attempted OP_SELLSTOP 2.70000000 lots @1.42570000 sl:1.42670000 tp:1.42070000

Or like this:

2009.08.07 10:04:44 YYYYExit EURUSD,H1: Pending sell failed
2009.08.07 10:04:44 YYYYExit EURUSD,H1: last error: 130:invalid stops
2009.08.07 10:04:44 YYYYExit EURUSD,H1: failed trade: OP_SELLSTOP EURUSD@1.41800000 tp@1.41300000 sl@1.41900000
2009.08.07 10:04:44 YYYYExit EURUSD,H1: failed to execute stop or limit order after 0 retries
2009.08.07 10:04:44 YYYYExit EURUSD,H1: non-retryable error: 130:invalid stops
2009.08.07 10:04:44 stdlib EURUSD,H1: loaded successfully
2009.08.07 10:03:38 XXXXEntry EURUSD,H1: open #14911354 buy 0.10 EURUSD at 1.4187

So once you understand the program, we need to go through the MQL4 trade execution errors and tell me my options then decide how to handle them before you code it.

I hope, you are already familiar how to manage existing orders by keeping track of the *ticket number* from the server, you are already familiar with LibOrderReliable_V1_1_4.mq4 and OrdersSuite.mq4 and similar attempts to handle errors in a systematic way.

As far as payment, I hope we can agree on something mutually acceptable.

One more thing: you will only program a nontradable code used for the SPECIFIC purpose of proving the error handling.

If you interested, please contact me.


Thanks, explorer
 
explorer3333:

I am looking for an EXPERIENCED professional programmer to redo (or finish) my EA. The current EA is working fine (my son, a computer science student did the logic) ……. until the connection to the server is lost or timed out, etc. etc. (One time I lost 50% of my capital overnight (luckily in demo) due to a bug creating an excessive number of 'open orders' 'owned' by the EA, both active and pending.)

So the main job is not to create the logic, although you may decide that you need to redo it for one reason or another, the main job is to create a RELIABLE code under real life execution, in other words, code with proper ERROR HANDLING for anything that can come up during unattended live trading.

The code is a Martingale type logic with a simple random entry (for the purpose of this test), so it is fairly straight forward therefore I don’t expect it to be a problem for you. The challenge starts when we get to the testing phase.

Here is my test plan:
First we test the core logic, just to make sure, the program doesn’t have basic logic errors.
Then we test the program for 120 unattended trades (about 2 weeks). The program has to handle the various trade disruptions successfully before I declare success (and you get paid). I.e., it can’t loose the place in the logic, it has to recover gracefully from timeout, weekend re-restart, etc. etc.

We will test it together, and each time there is an error (like in the examples below), I will give you a similar feedback:

2009.08.07 07:12:31 YYYYExit EURUSD,H1: Pending sell failed
2009.08.07 07:12:31 YYYYExit EURUSD,H1: last error: 128:trade timeout
2009.08.07 07:12:31 YYYYExit EURUSD,H1: failed trade: OP_SELLSTOP EURUSD@1.42570000 tp@1.42070000 sl@1.42670000
2009.08.07 07:12:31 YYYYExit EURUSD,H1: failed to execute stop or limit order after 1 retries
2009.08.07 07:12:31 YYYYExit EURUSD,H1: non-retryable error: 128:trade timeout
2009.08.07 07:09:44 YYYYExit EURUSD,H1: retryable error (1/10): 6:no connection with trade server
2009.08.07 07:09:44 stdlib EURUSD,H1: loaded successfully
2009.08.07 07:07:36 YYYYExit EURUSD,H1: attempted OP_SELLSTOP 2.70000000 lots @1.42570000 sl:1.42670000 tp:1.42070000

Or like this:

2009.08.07 10:04:44 YYYYExit EURUSD,H1: Pending sell failed
2009.08.07 10:04:44 YYYYExit EURUSD,H1: last error: 130:invalid stops
2009.08.07 10:04:44 YYYYExit EURUSD,H1: failed trade: OP_SELLSTOP EURUSD@1.41800000 tp@1.41300000 sl@1.41900000
2009.08.07 10:04:44 YYYYExit EURUSD,H1: failed to execute stop or limit order after 0 retries
2009.08.07 10:04:44 YYYYExit EURUSD,H1: non-retryable error: 130:invalid stops
2009.08.07 10:04:44 stdlib EURUSD,H1: loaded successfully
2009.08.07 10:03:38 XXXXEntry EURUSD,H1: open #14911354 buy 0.10 EURUSD at 1.4187

So once you understand the program, we need to go through the MQL4 trade execution errors and tell me my options then decide how to handle them before you code it.

I hope, you are already familiar how to manage existing orders by keeping track of the *ticket number* from the server, you are already familiar with LibOrderReliable_V1_1_4.mq4 and OrdersSuite.mq4 and similar attempts to handle errors in a systematic way. IF NOT, PLEASE LET DON ’T WASTE EACH OTHER TIME. (I need to learn from you, not teaching you.)

One more thing, my son is a fledgling computer programmer already working for a major corporation for the summer. He asked me to obtain a code sample from you, because he wants to see if your coding style is up to his professional standard. (Sorry, but we are looking professionally trained programmer here.)

As far as payment, once we agree, I will put the money in escrow, and if you pass the “120 trades test” with the pre-agreed result, you will be paid. In exchange, you could only provide me the .ex4 version for the testing.

One more thing: you will only program a nontradable code used for the SPECIFIC purpose of proving the error handling. It has nothing to do with the EA that I will trade live (unless you are hot to loose with Martingale). This is a programming job after all. Various bulletin boards have plenty of good EA if you need one.

Are you up for the challenge?

If yes:

  1. Tell me why are you qualified?
  2. Send a code sample, preferably an (non-working) EA to check your coding style.
  3. Give contact info/email, so we can communicate privately.

Thanks, explorer

Hi!


My name is Daniel, I'm from Brazil, and I'm pos graduate in Information Systems.

I'm programer since 1998, and I know how to resolve your problems.


My e-mail is danielvc@gmail.com


Look the result of my EAs.. they have orders management.

http://forexfortune.mt4stats.com

http://danielvc.mt4stats.com


Best regards,

Dan (aka BearNaked)

 
bearnaked:

Hi!


My name is Daniel, I'm from Brazil, and I'm pos graduate in Information Systems.

I'm programer since 1998, and I know how to resolve your problems.


My e-mail is danielvc@gmail.com


Look the result of my EAs.. they have orders management.

http://forexfortune.mt4stats.com

http://danielvc.mt4stats.com


Best regards,

Dan (aka BearNaked)

Daniel,


With all respect, I am glad your trading profitable, but that is not what I need to know.


Could you, are you willing to provide me a code sample of yours (non profitable EA is ok) so I can check your professional coding style?


Thanks, explorer

 

Good coding style does not necessarily co-relate with good coding logic or good error handling logic, though it helps.


Don't take this the wrong way because I'm simply pointing out the facts - your son who is supposedly an expert on coding style has failed in coding the logic of error-handling. So how is the emphasis on coding style going to help the situation?

 

explorer3333, I can definitely code your EA. Usually it takes me less than an hour or two from scratch to a beta and I've coded over a hundred by now. I've also definitely got more credentials than you are asking for. As for error-catching, you won't have any problems with me as I'm a completely paranoid programmer who doesn't just put error-catching everywhere but also reports it all to track it down with just a glimpse. My question though is.. is it a system you've traded profitably? Is it worth putting my other projects aside while I code this? What exactly are you paying?

.

Feel free to hit me up with a PM if you wish to discuss more,

Jon

 
blogzr3:

Good coding style does not necessarily co-relate with good coding logic or good error handling logic, though it helps.


Don't take this the wrong way because I'm simply pointing out the facts - your son who is supposedly an expert on coding style has failed in coding the logic of error-handling. So how is the emphasis on coding style going to help the situation?

Thanks to point out, but the (right or wrong) reason is, because he has to maintain the code long after the project is closed, so he prefers something that is properly structured (for him).

Thanks again, explorer

 
Fair enough. Thanks for the reply.
 
blogzr3:
Fair enough. Thanks for the reply.

I rewrote the original "ad", because other experienced coders were offended, and I didn't mean to offend people. Hopefully now is more acceptable.

 
Archael:

explorer3333, I can definitely code your EA. Usually it takes me less than an hour or two from scratch to a beta and I've coded over a hundred by now. I've also definitely got more credentials than you are asking for. As for error-catching, you won't have any problems with me as I'm a completely paranoid programmer who doesn't just put error-catching everywhere but also reports it all to track it down with just a glimpse. My question though is.. is it a system you've traded profitably? Is it worth putting my other projects aside while I code this? What exactly are you paying?

.

Feel free to hit me up with a PM if you wish to discuss more,

Jon

Archael,


The original system that needs the error handing is profitable. But to save time and money, I created a bare bone version to test the error handling ONLY. This test version is NOT profitable. But my goal with this project is not to prove the profitability of the EA, rather the development of the proper error handling, i.e., not to loose a trade because of the inadequate error handling.

What am I paying? Whatever we agree, but I am prepared to pay fair wages for someone's time and experience. I will need some time estimate before we can go somewhere, but it is a catch-22, because you need to know, what are we doing, before you can estimate anything. So without any commitment, let me say, $1000 would not be unreasonable if we can agree on the scope and the code works.


Thanks,

explorer

 
explorer3333:

Archael,


The original system that needs the error handing is profitable. But to save time and money, I created a bare bone version to test the error handling ONLY. This test version is NOT profitable. But my goal with this project is not to prove the profitability of the EA, rather the development of the proper error handling, i.e., not to loose a trade because of the inadequate error handling.

What am I paying? Whatever we agree, but I am prepared to pay fair wages for someone's time and experience. I will need some time estimate before we can go somewhere, but it is a catch-22, because you need to know, what are we doing, before you can estimate anything. So without any commitment, let me say, $1000 would not be unreasonable if we can agree on the scope and the code works.


Thanks,

explorer

Hi Explorer.. see an example of my code style;

void sendOrder(int tipoOrdem)
{
    // works only in specifies days   
    if ((DayOfWeek()==1 && Monday==false)||
       (DayOfWeek()==2 && Tuesday ==false)||
       (DayOfWeek()==3 && Wednesday ==false)||
       (DayOfWeek()==4 && Thursday ==false)||
       (DayOfWeek()==5 && Friday ==false))
       return;

    double tmpStopLoss;
    // se eu estiver usando stoplossvirtual.. desconsidera o valor de stoploss atual
    if (UseTrailingStopLoss==true)
    tmpStopLoss=0;
    else
    if (UseTrailingStopLoss==false)
    {
        if (tipoOrdem==OP_BUY)
            tmpStopLoss=Ask-StopLoss*Point;
        else
        if (tipoOrdem==OP_SELL)
            tmpStopLoss=Bid+StopLoss*Point;
    }  
  
    for(int a=0;a<OrdersTotal();a++)
    {
        if(OrderSelect(a,SELECT_BY_POS,MODE_TRADES)==true)
            if (OrderSymbol() == Symbol()&&OrderMagicNumber()==MagicNumber)
                // se a hora for a mesma do último trade efetuado.. cai fora!
                    if ((TimeDay(OrderOpenTime())== Day())&& (Minute()- TimeMinute(OrderOpenTime()<45)))
                       return;
    }
   

    // order ticket 
    int ticket;

    //try to send the order
    while (true)
    {

        //update price information
        RefreshRates();
        if (tipoOrdem == OP_BUY)
        {
            OrderSend(Symbol(),// símnolo
                        OP_BUY,// operação
               LotsOptimized(),// volume
                           Ask,// preço
                      Slippage,// slippage
                   tmpStopLoss,// StopLoss loss
          Ask+TakeProfit*Point,
                    "Explorer",
                   MagicNumber);
        }
        else
        if (tipoOrdem == OP_SELL)
        {
            OrderSend(Symbol(),// símnolo
                       OP_SELL,// operação
               LotsOptimized(),// volume
                           Bid,// preço
                      Slippage,// slippage
                   tmpStopLoss,// StopLoss loss
          Bid-TakeProfit*Point,
                            "",
                   MagicNumber);
        }
        if(ticket<=0)
        {
            int error=GetLastError();
             //---- not enough money
            if(error==134)
            {
                 //error handling
                 showMessageError(error)
                 break;
            }
           //---- 10 seconds wait
           Sleep(10000);
           //---- refresh price data
           RefreshRates();
           break;
        }
        else
        {
             OrderSelect(ticket,SELECT_BY_TICKET);
             OrderPrint();
             break;
        }
    }
 
}
 
bearnaked:

Hi Explorer.. see an example of my code style;


bearnaked,

My son looked the code and his comments to me are below. Please don't take offense about his comment, my goal is to have trust in someone like you before we start. If you don't mind, could you give him a short technical answer? I would appreciate it.

explorer


From my son:

The while loop seems to depend on the value of the "ticket" variable, which has no defined initial value and is never assigned a value (a nasty bug in C-like programs, I'm unclear whether MQL retains this deficiency). At a glance, it should be "ticket = OrderSend..." but that part seems to be left out.


Furthermore, I don't understand the reason for the following snippet in the error-handling section:
           Sleep(10000);
           //---- refresh price data
           RefreshRates();
           break;

This tells me that if the order did not not go through properly (assuming it's a server error), that you will halt the program for ten seconds (during which many ticks may come in that we need to act upon), and then not attempt to send the order again (but instead break out of the loop).

The style is definitely not as bad as what I've seen (and I like that he encapsulates the order sending logic in a separate function), but if this is code that he intends to use, he needs to explain why he implemented the error handling the way he did, and why he didn't initialize or assign a value to the ticket (which stands out to me as a glaring bug).