V1andV2 Hedged EA: Beautiful Equity Curve - page 8

 
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

 

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

Files:
 
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:
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.

 

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.

 
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?

 

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?

 
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!

 
mikejody:
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?

Mike, the mean reason to clean up the code is that it would be easier to work with for a programmer if he/she wants to improve upon it. From an end-user perspective it doesn't make any difference. I remember cucurucu being reluctant to post the EAs beacuse the code was "dirty", so we may be grateful that he actually did post them and should not criticize the code for what it is because he never claimed anything else. That said, I do appreciate the efforts of Ryan to clean it up, as this will help further development.

V1clean is equivalent to the original V1, so would be for a standard account.

 
zuijlen:
Mike, the mean reason to clean up the code is that it would be easier to work with for a programmer if he/she wants to improve upon it. From an end-user perspective it doesn't make any difference. I remember cucurucu being reluctant to post the EAs beacuse the code was "dirty", so we may be grateful that he actually did post them and should not criticize the code for what it is because he never claimed anything else. That said, I do appreciate the efforts of Ryan to clean it up, as this will help further development. V1clean is equivalent to the original V1, so would be for a standard account.

Ah, now I understand perfectly. Thank you for this explanation. You coders need language that is understandable, I get it .

We end users only need an EA with V1andV2 combined, both for a standard and a mini account. By the way, would you or Ryan be able to explain to us when should one transition from a mini to a standard account?

Thank you all, it is good to see such committed work going on in this project. I saw the value of it because of the end result, you guys obviously see that as well, and are making it better.

Reason: