Phoenix - Development+Suggestions - MQ4 in Post#1 - page 18

 

As far as I know, PContour's changes will be purely cosmetic. Many people found the reorganized version easier to read and understand what parts are necessary to a settings file, etc.

 
 

Phoenix_EA_v5_7_F.mq4 - Cosmetic Changes Completed

daraknor:
As far as I know, PContour's changes will be purely cosmetic. Many people found the reorganized version easier to read and understand what parts are necessary to a settings file, etc.

Happy New Year

Introduction

The Cosmetic changes in version Phoenix_EA_v5_7_F.mq4 are considerable, but the code still works the same as Phoenix_EA_v5_7_0.mq4. I ran 8 different simulations with various conditions to attempt to ensure that the results are the same. Two for Mode 1 and two for Mode 2 and three for mode 3.

Changes

  1. The changes should help to make the code easier to maintain and provide a good basic format for any new EA's.
  2. Settings files for version 5.7.0 can be converted.
  3. For non-programmers the external variable names are self-documenting.
  4. New documentation is needed.
  5. This should be a small inconvenience for some long term gain.
  6. External Variables Help

    //+--------------------------------------------------------------------------------------------------+

    //| Fields that start with

    //|

    //| U_ - are USER fields - that the user always chooses.

    //| - contain defaults that are the same for all currencies.

    //| - You must set these, even if you set PrefSettings to True

    //|

    //| P - If you set PrefSettings to False then you need to set all the

    //| - external fields starting with P_ and U_ to your own settings.

    //|

    //| C - These are just comments

    //+--------------------------------------------------------------------------------------------------+

    Settings File Conversion

    One person noticed a big issue with the settings files. The order of the external variables had been changed so that his settings files that he had saved would no longer work. Good Point!

    I build a converter using excel to convert settings files for:

      Phoenix_EA_v5_7_0.mq4 into Phoenix_EA_v5_7_F.mq4

      Settings File Conversion Steps

      1. Open the EXCEL .xls fileinside attachment phoenix 5.7.0.Convert2.zip.
      2. Close any other EXCEL files for safety.
      3. Open, in a text editor, your ".set" file from directory "C:\Program Files\MetaTrader 4\tester".
      4. Select and copy the whole file. a then c or for your editor do: a then
      5. Go to the EXCEL Do a. That's all you do. The spreadsheet is "read only" to protect you from destroying it.
      6. Go back to your text editor do: a then v or for your editor do: a then
      7. Save the file in your text editor.

      You can repeat steps 3 to 9 again and again.

      Testing a Converted Settings File

    • Open Phoenix_EA_v5_7_0 in MetaTrader
    • Change some settings
    • Run a simulation.
    • Check the Report Tab
    • Save the settings file
    • Complete the Settings File Conversion Steps above.
    • Open Phoenix_EA_v5_7_F in MetaTrader
    • Load the settings file (now converted)
    • Run the same simulation
    • Check the Report Tab (the result should be the same as step 4

Final Comments

  • I'm on vacation for a few days. I won't be able to check-in again until next Friday or Saturday. This will give you some time to ensure no errors have been introduced.
  • I could update the documentation within two weeks. This is something that is on Darknor's todo list already, but it has become more urgent. On the other hand the self documenting nature of the External Variables will be a big help to any newbies.
  • I hope you find these changes effective. I am a Forex newbie so these changes have helped me to learn a lot more about this EA and the concepts. I look forward to learning a lot more and helping out where I can.
  • If there are any issues - hopefully Darknor can help out.
  • Phoenix_EA_v5_7_F.mq4 - (F-for-Formatted) - Darknor Please give this an appropriate version number later.
  •  
    daraknor:
    It is interesting to see how his public demeanor has shifted. There are many 'takers' in the world that just consume and don't improve the world in any way. I don't think we can (or should try) to change that, but we don't need to feed them either. I have been saying for a few years, "We sacrifice our best to feed our worst" and have not attempted to define best and worst beyond production and the fact that unscrupulous people often take advantage of others. At the same time, I don't think that a large community project can survive while being closed. Some groups like Daemon Tools try, but they have resorted to sticking adware in the most recent versions. In regard to optimization and trends, these are things we have discussed. It is interesting how much Hendrick has reversed regarding optimization (same settings for 5 years) but I do think each currency, (and possibly each market type) have certain behaviors.

    I think there are many things in life which really cannot be understood best when measured quantitatively. There will always be "takers/consumers" even in a closed group...they always manage to get in somehow, it is a fact of life and a by-product of our design by our Creator as "survivors". In spite of that, there are many people who still recognize the virtue found in allowing themselves to become "broken bread and poured-out wine" for the benefit of others. I believe Hendrick has acted as such in sharing Phoenix with the community. May we all honor his gift and give our part in helping to further enhance Phoenix for the good of all in the same spirit it was given to us...

    Thank you Hendrick and best wishes for your future success, health and prosperity. May God richly bless you for your generosity!

     

    Changelog 5.7.1

    Phoenix 5.7.1 Released

    This is a compilation of community contributed fixes and a major reorganization of the variable naming scheme. There are so many variables and settings it is important to know what parts should be changed by a settings file.

    Pcontour renamed most of the functions and variables in Phoenix.

    I took the reorganization as a chance to do a few other edits:

    Added the min/max lot sizing contributed by Dmitry_ch in the main Phoenix 2007 thread. It is recommended that an appropriate minimum value is input.

    Changed the functionality of iOSMA to match the standard implementation http://docs.mql4.com/indicators/iOsMA contributed by Yashil in the main Phoenix 2007 thread. I delayed this change thinking it might break the settings files, but it appears the change shouldn't affect anything you see. if something is weird, please let me know.

    Added a separate trailing stop variable for graceful close function suggested by Pcontour in PM. This number should be smaller and tighter than a normal SL, so having a separate value makes sense.

    Confirmed new SL is better than the old SL. This might have been a hidden bug in the PeriodGrace code. Added a TODO to check this code more.

    Deleted old blocks of code that were commented out because they didn't work. Since 5.7.0 is stable, no need to keep unused code.

    I sincerely welcome people contributing their own versions of Phoenix to this thread with changes that they make. I request a style of commenting so we can tell who did what, where and when.

    //USER ACTION VERSION notes

    //Daraknor Add 5.7.1 added min/max values

    I also tend to comment out the old lines so people can see what I changed. I would personally prefer not having my nickname all over the file because #1 it is fairly long #2 I'm doing most of the submissions. When other people make changes if they follow a documentation system then we can easily find what was changed and when. I also use the version numbers to search around, making it easy to find what I had been working on previously. This documentation is a request, but if other people don't document what they changed I likely will comment.

    Pcontour's major variable/function renaming would have his name on over half of the file, so I only added his name up in the top with the description. Adding names isn't really necessary, but it clarifies what we're doing to each other and the copyright over the code. I'll stop rambling about this

    Files:
     

    Phoenix Status Updated Jan 02, 2007

    I didn't work as much as I would have liked over the Christmas and New Year holiday, but it gave time for forward testing. 5.7.0 is declared stable, and a new testing version was released. Hendrick is still on vacation. I think I'm full strength and not sick anymore. Thank you all very much for your continued use of Phoenix, suggestions, bugfixes, communication and support. I added a todo list so people know how to contribute time to the project as a whole.

    PhoenixFund (through an existing non profit Foundation) was approved as an IB. The paperwork is in review, and I'm mostly waiting and ready to answer any questions that they have. I won't earn anything for setting up the PhoenixFund IB, nor anything from people contributing to PhoenixFund from their own pockets. All of the funds donated or through the IB are used for trading Phoenix, minus banking fees. PhoenixFund will reinvest 50% and donate 50% of the monthly profits (never contributions) to nonprofits who are: document their costs transparently, nonsecular, aligned with the United Nations Development Program goals. I want to write this in a way that anyone who joins PhoenixFund or comes after me will need to follow the same guidelines. I think an "official meeting" along with a resolution is a decent way to do this, but suggestions are great.

    I do intend to receive some benefit from my work, but the only benefits will be synergistic, like hosting the PhoenixFund and providing links to commercial services I provide. Forex-TSD.com will continue to be the main communication method for Phoenix, and most of the information will be duplicated. Some info will be better organized as a website than a forum post.

    -----

    Phoenix Development Plans

    We have a (mostly) stable release of Phoenix! I say "mostly" because some features have not had adequate testing and confirmation, but there are no pending bugs in Phoenix 5.7.0. Some community developments for extra broker compatibility were added, variable organization, and a few other changes were added to 5.7.1. If 5.7.1 doesn't have any bugs after two weeks of decent testing (and/or bugs in 5.7.0 are found and confirmed to be fixed in 5.7.1) then 5.7.1 will be declared stable.

    Most of my effort on Phoenix for the next week is going to be optimization testing and documentation. The documentation will be based around the new 5.7.1 style for optimization. Any "User Guides" for 5.7.0 style or 5.7.1 style are greatly appreciated.

    Phoenix 6 development has begun, but slowly right now. A template with "a lot of useless code" will be released to other developers soon, so we can collaboratively build Phoenix 6. The template method is desired for organization of code, and so people can more easily modify pieces of Phoenix without worrying the entire system will shake. Phoenix Contest, 4 and 5 have made good use of functions, but knowing where to add a new function or new filter indicator is very difficult. The template system will attempt to make that easier. It may be "more code" but the part that a developer needs to pay attention to will be a lot smaller.

    Here are a few features that I think are very important for Phoenix 6:

    Trend Detection (Bertbin mentioned Turbo_jrsx and Turbo_jevl, I have been looking at Fish.)

    Support and Resist Detection

    Different Money management options

    Here are a few features that I would like to see in Phoenix 6:

    Filter Signals (don't enter market if...)

    Confirmation Signals (linked to money & trade management)

    Support for managed exits

    Support for multiple sets of managed trades (several mode3 simultaneously on a single currency)

    Easy optional logging

    Better Magic Number management - ideally the system would detect if trades are currently open with magic numbers chosen

    Weighted intelligent signal management

    I have a few more ideas for things that would be nice but I'd like to keep some challenging features for Phoenix 7, building off the features in Phoenix 6. (Going to the next level of self tuning AI)

     

    Kudos on release of 5.7.1

    Congratulations on the release of the new Phoenix, though this version has such a different look I suspect it should have started a new number series. One suggestion: since the structure has changed so much, it might be helpful if you included settings files used with your preliminary testing so we can start a fresh backtesting program.

    Autumn

     

    Settings file Converstion to 5.7.1

    Tried converting a 5.7.0 settings file to the new format with the Excel converter. Can't get it to work.

     
    cockeyedcowboy:
    daraknor

    Try this, add the contents of this file to the end of all your EAs. It is what I use to document my work, and leave the code body clear of excessive comments and REMed out code. It has an area for udates, future improvements, purpose, usage, notes, and storage area for all your code that you remove but dont want to delete yet. Kind of like if you want to revert back at a later date the old functionality of the program. You never for get why you did something either. If you need to introduce a large comment into your code then just add a 'see NOTE X in doc' in the code body itself with added note in documentation. By putting it at the end of your code you can make it as long as you want without having to scroll through it each time you work on the EA.

    Thanks for the idea, it seems like a typical changelog submission. Since more than one person is making modifications and I need them "painted" very clearly, a quick comment on each line makes a big difference. Aside from that, the only way I have to track changes is use the unix "diff" utility. After running diff, I scan the two files by hand, and jump to the line numbers mentioned by diff. Then I go back and integrate those changes in the newer file, and do some sort of commenting so people can find out what changed without using diff. It would be easier if MetaTrader supported line numbers :/ In general I try to keep old version next to new version so people can see exactly what was done. Easier and less typing than trying to give line by line change descriptions too. Major rewrites I use a line or two to explain.

    I'm probably going overkill with documentation, but having the docs inline helps me personally too.

     
    autumnleaves:
    Congratulations on the release of the new Phoenix, though this version has such a different look I suspect it should have started a new number series. One suggestion: since the structure has changed so much, it might be helpful if you included settings files used with your preliminary testing so we can start a fresh backtesting program. Autumn

    I will try to create some EURUSD settings soon under the new style.

    I was thinking about adding a letter for the new style, but I don't want to create a code fork. We waited for a stable version, made the changes, and Pcontour was very careful to not change the functionality at all. I sat here for a long time wondering what I should do about the version numbers, and if I should release two different versions for the same code. I thought about making it 5.8.0, or 5.7.1-f and 5.7.1. Since the main functionality changes were a few variables added with default behavior not changing at all, I decided to look at "what functionality changed" rather than what cosmetically changed. I had decided originally on using a code letter so we could separately track the two styles of variable naming. Then I realized how much extra work that would be, and that we should just go to the new style because it is obviously superior and should have an easy migration.

    I'm disappointed the Excel file didn't work, I can take a look later on. Honestly, I might have broken the Excel file by adding 3 new variables (U_MinLot U_MaxLot and the GracePeriod Trailing Stop). Adding the variables manually should be easy, because the order didn't change much at all.

    Reason: