V1andV2 Hedged EA: Beautiful Equity Curve - page 8

To add comments, please log in or register
fxgrm
79
fxgrm  

Thanks!

ryanklefas:
The code is also very messy. I offer to clean it up and maybe implement some of the newer features that are wanted.

I am sure everyone who is trying this EA out would appreciate you cleaning it up code wise.

mikejody
518
mikejody  
ryanklefas:
I anlyzed the code for the EAs given on post #1. They are both the exact same EA, save for a few different settings. To begin with, I think it would simplify the development process if we got rid of the second EA, and simply attach settings files for the hedging part involved. The code is also very messy. I offer to clean it up and maybe implement some of the newer features that are wanted.

Thank you for offering to be part of the solution, rather than simply criticizing someone else's work.

We all would be grateful if you could clean it up, and also if you have a way of allowing us to adjust risk.

Thank you ryanklefas,

Mike

ryanklefas
598
ryanklefas  

A little cleaner, perhps better?

Here is a cleaner version of V1. If this EA works the way I think it does, to get a "V2" all you have to do is change a few of the settings. Here is what I did

I cleaned out unnecessary variables, changed unintelligible variable and file names so that you can somewhat understand what the EA is doing, organized the code so it is easier to read, and brought out some of the external inputs that were hidden away.

I have not implemented anything new; if someone can verity that this cleaner version works as the "dirty" ones did, then I will start adding features to it. I've attached a strategy test that "V1 Clean" produced. All looks well?

PS: It is my humble honorto help the community develop this promising EA

mikejody
518
mikejody  
ryanklefas:
Here is a cleaner version of V1. If this EA works the way I think it does, to get a "V2" all you have to do is change a few of the settings. Here is what I did

I cleaned out unnecessary variables, changed unintelligible variable and file names so that you can somewhat understand what the EA is doing, organized the code so it is easier to read, and brought out some of the external inputs that were hidden away.

I have not implemented anything new; if someone can verity that this cleaner version works as the "dirty" ones did, then I will start adding features to it. I've attached a strategy test that "V1 Clean" produced. All looks well?

PS: It is my humble honorto help the community develop this promising EA
ryanklefas:
It is my humble honorto help the community develop this promising EA

You are appreciated! How sad when people feel the need to slam others to make themselves feel better, as the "good" Dr. above. You are not that way, and we appreciate your help so far!

As I said above, I am not a programmer and do not understand the value of having "clean" code vs. "dirty" code. The old EA works wonderfully for me, but if this "clean" code improves it somehow then let's use it. The strategy tester certainly looks nice.

Question, can you make this EA with a V2 as well? Obviously that is required in order to hedge.

Thank you again, both for your desire to help and your attitude in doing so.

ryanklefas
598
ryanklefas  

V1 and V2

I had no idea there were already a bunch of versions of the EA already floating around. A much better version of the EA can be found here:

https://www.mql5.com/en/forum/176083

mikejody
518
mikejody  
ryanklefas:
Voila! Settings for V1 and V2. These setting files are used by "V1 Clean" which is to be found a few posts up.

Ryanklefas, thank you for this. Can you please help us understand what we can do with them? Do we put these settings somewhere, or are they just useful for us understanding the EA?

Thank you again.

ryanklefas
598
ryanklefas  

Here's what you do

For simplicity, put the settings files with the EA. (Actually they can be loaded from anywhere). To get the hedge that you have been using with V1 and V2, here is what you do:

  • Add V1 Clean to a chart, load the V1 settings file (there is a load button on the Expert inputs window when you first apply the EA)
  • Add V1 Clean to another chart, load this one with V2 settings file

As I said earlier, V1 and V2 are actually the same EA with different settings. This setup just makes it more obvious. Also, I won't have to modify 2 or more EAs every time a new feature is needed. I'll just be modifying one EA.

mikejody
518
mikejody  
ryanklefas:
For simplicity, put the settings files with the EA. (Actually they can be loaded from anywhere). To get the hedge that you have been using with V1 and V2, here is what you do:
  • Add V1 Clean to a chart, load the V1 settings file (there is a load button on the Expert inputs window when you first apply the EA)
  • Add V1 Clean to another chart, load this one with V2 settings file
As I said earlier, V1 and V2 are actually the same EA with different settings. This setup just makes it more obvious. Also, I won't have to modify 2 or more EAs every time a new feature is needed. I'll just be modifying one EA.

Ryan, can you explain in laymen's (non-programmer) terminology the reason we would need this "clean code" version? I am not knocking the value of it, and can see from a coder's perspective why it would be important to work with clean code, but from an end-users perspective who knows nothing about code, would there be a reason why I would not keep using the same dirty code V1andV2mini that I have been using?

Also, is the V1clean for mini accounts or standard?

Job M van Zuijlen
93
Job M van Zuijlen  

Using the combined EA?

I know that bolla created an EA combining V1 and V2, which has been posted in this thread. I have not used it myself, but wouldn't it be easier to base continued development on that one?

mikejody
518
mikejody  
zuijlen:
I know that bolla created an EA combining V1 and V2, which has been posted in this thread. I have not used it myself, but wouldn't it be easier to base continued development on that one?

Yes, what we really need most are simply two EA's here:

One to work with a standard account (V1andV2) and one to work with a mini account (V1andV2Mini).

Ryan, any chance you can do you "clean up code" magic with those two EA's? That would enable everyone not to have to load settings, but could just load the EAs like normal.

I know we're asking a lot, I'm glad you're generous!

To add comments, please log in or register