Please fix this indicator or EA - page 116

 

Mladen, Mr. Tools:

Please, can you take a look at this EA...?... What is wrong with it...??..

Can you make it work in real account...?...

Files:
 

change name to "BadAss"...might help...

fxnewbie:
Mladen, Mr. Tools:

Please, can you take a look at this EA...?... What is wrong with it...??..

Can you make it work in real account...?...

 
fxnewbie:
Mladen, Mr. Tools:

Please, can you take a look at this EA...?... What is wrong with it...??..

Can you make it work in real account...?...

fxnewbie

As far as the code is concerned, there is no issue in it (2 warnings in the new metatrader 4, but those 2 warnings are completely benign). Are yuo getting any errors in the journal or experts tab of your terminal?

 
fxnewbie:
Mladen, Mr. Tools:

Please, can you take a look at this EA...?... What is wrong with it...??..

Can you make it work in real account...?...

fxnewbie

try it out now, but my recommendation is that you do not use that EA.

There are too many coding errors in it (just one example : here is a part of code from the EA - from the end of ordBuy() function

return(hb);

return(ox);

return(totfr);

second and third line can never be executed, and that is probably (because of coding constructions similar to that) a cause for some errors. There is quite a few cases like that, and I can not guarantee to you that it will work properly in all cases.

Now it is working in back-test, but I do not know how it will work on real account. If your brokers is an ECN type broker (does not allow setting stop loss and take profit along with order opening), then you should set the ECNBroker parameter to true. If it is not you can set it to false (but it will work even if the ECNBroker parameter is set to true.

Back tested it on a 1 minute GBPUSD chart default parameters. The last order (the loosing one) was closed due to test ending

Anyway, try it out

 
fxnewbie:
Mladen, Mr. Tools:

Please, can you take a look at this EA...?... What is wrong with it...??..

Can you make it work in real account...?...

Hello fxnewbie,

See threat form 1142 and further on. You'll find here an answer.

Regards, Marco

 
mladen:
Marco

You already have parameters to change all those values (Period_1 and Period_2, for ma lengths, Ma_Method for average type) Using shift in indicators when used in EAs as a signal is not a good idea. Added a price parameter for the moving averages and now you can have differen types of averages for both averages (not recomended to use different types of averages for crosses, but if you wish to experiment, try different combinations).

Also, to make it work on 1 minute time frame simply attach it to a 1 minute chart

Hi MLaden,

Could you adjust next in this EA you already updated:

- hedge function which can be switched on/off by true or false

- when hedge function is set on true mode in a separate input how many pips to hedge max.

- if the hedge function is set in true mode I would like to have a trailing on this specific hedge order

- if hedge fucntion is set on true mode it must always leave the hedgeorder at BEP (this break even function has to be in the input so you can change the BEP value because every foreign exchange pairs has it's own spread value and depends on which broker

Hedging in this matter should be in the same forexpair, so when a buy order is going in certain lost trade it has to open a sell trade in the same pair. Their is one advantage your margin will be temporarily frozen at that time only for the differences of these 2 trade values.

I hope to hear from you and thx for your help.

Regards Marco

 
Marco320:
Hi MLaden,

Could you adjust next in this EA you already updated:

- hedge function which can be switched on/off by true or false

- when hedge function is set on true mode in a separate input how many pips to hedge max.

- if the hedge function is set in true mode I would like to have a trailing on this specific hedge order

- if hedge fucntion is set on true mode it must always leave the hedgeorder at BEP (this break even function has to be in the input so you can change the BEP value because every foreign exchange pairs has it's own spread value and depends on which broker

Hedging in this matter should be in the same forexpair, so when a buy order is going in certain lost trade it has to open a sell trade in the same pair. Their is one advantage your margin will be temporarily frozen at that time only for the differences of these 2 trade values.

I hope to hear from you and thx for your help.

Regards Marco

Marco

Please read that post of mine again (the part about coding issues that lead to nothing - it is impossible to get to the bottom of the logic of code written like that and, frankly, when I see that kind of coding (the triple return is a basic 101 coding error) I turn away and do not work on it any more)

That whole EA should, in my opinion be rewritten from scratch or used some other instead. I did change the way how ECN brokers are treated (since the logic that 5 digit broker must be an ECN broker has no ground at all), but please do not ask me to correct something in a code that needs 100 corrections not 1 or 2

regards

Mladen

 
mladen:
Marco

Please read that post of mine again (the part about coding issues that lead to nothing - it is impossible to get to the bottom of the logic of code written like that and, frankly, when I see that kind of coding (the triple return is a basic 101 coding error) I turn away and do not work on it any more)

That whole EA should, in my opinion be rewritten from scratch or used some other instead. I did change the way how ECN brokers are treated (since the logic that 5 digit broker must be an ECN broker has no ground at all), but please do not ask me to correct something in a code that needs 100 corrections not 1 or 2

regards

Mladen

Hi MLaden,

I do not understand so this EA which I meant to adjust the hedge features, adjustable_ma_1.02.mq4, has a lot of coding failures?

Regards, Marco

Files:
 
Marco320:
Hi MLaden,

I do not understand so this EA which I meant to adjust the hedge features, adjustable_ma_1.02.mq4, has a lot of coding failures?

Regards, Marco

To quote your first sentence from your post :

"Could you adjust next in this EA you already updated:"

What EA was I supposed to think of?

As of hedging : would you mind laying down the exact set of rules with and detail description how the hedging you are talking about is supposed to work and how should it be incorporated in the current way that EA works (that is an EA that closes automatically previous order when it finds an oposite signal)?

all the best

 

Hello everybody,

I'm trying to create a GRID EA that works like this:

If it goes up 10 pips, BUY unless there is another buy already at that price level.

If it goes down 10 pips from previous buy, SELL unless there is already a sell at that level.

In other works, it should take no regard to timeframes, but purely moves (imagine renko).

I have attached the EA I've been working on, but it's not working properly. Would very much appreciate it if someone could take a quick look and see where I went wrong.

It's set up right now to 1)buy if ask > last order open price , 2) but not if there is a buy within 10 pip deviation from current price and 3) not if there is any another position within 10 pips deviation from current price (so that it wont buy first and then sell when it gets just below the just opened buy order.

Kind regards,

Axel

Files:
grid.mq4  10 kb
Reason: