Phoenix 6 Expert vs Simple - page 3

 

Different brokers do things different ways. I'd like Phoenix 6 to support multiple brokers by release, but most of the issues I'm assuming we'll run into this point will be logical and environmental, not semantical. (e.g. The way I wrote the code sucks or the broker is weird but trades actually seem to work.)

I'll stick in another 1-3 indicators tonight for different trend analysis. I'm thinking Jurik's trend code and standard OSMA for trend detection/avoidance. I will dip into my puddle of indicators if I have time tonight. In terms of a framework, Phoenix Expert will allow Indicator1 AND Indicator2 OR Indicator3. It is capable of logical OR, AND, XOR, NOT as well as weighted signals (allowing for hybrid strategies in a single EA).

I read the code start to finish twice before releasing the Alpha. I rewrote some sections, checked the system with backtesting, fiddled with some signal optimization, etc. The majority of the work ahead is simply knocking off pieces of the TODO list, and then culling code for Phoenix Simple. Adding indicators is easy, especially without a true/false matrix written in code.

 
wujun122:
Hi,Daraknor!Should I both test Phoenix6 ALPHA.mq4 (in the post #2) and Phoenix6 alpha easy.mq4 (in the post #13) or choose one?

EASY was a modification I made adding another indicator because Autumnleaves was asking about adding indicators. A friend asked me where the problem in code was, I made some quick modifications and then shared them. Phoenix EASY is just a side project, and not really Phoenix.

autumnleaves, I didn't see any flaw in the code, but I don't know what settings you would use with the indicator are. The issue I saw with the settings I tried was that one of the values was always 0 and you needed a positive value less than 0 to start a trade. I would focus debugging on the actual settings, and try to get both values to positive numbers greater than zero. The easiest way to do this is to make it the only active signal in Phoenix 6 EASY, set the number of signals required to 1, and then look at the logs for results. They will be stored in MT4\tester\files\

 

It's not the holy grail, but I'm tired and this is about what I was looking for. When the moving average departs from the price on the chart, you can specify the difference in pips that is allowed before trades are blocked. I also reset the signalcount for that type of trade, so it won't just wait for the first peak to trade. If desired we can do this to the other filters, making them stronger. (If the filter is broken ConsecSignals would need to start over.)

So here is the Alpha 1 release with the extra filter and the bug fixes for mini accounts and period detection spotted earlier.

I'll try to add Jurik and/or ADX indicators for trading as well. Since ADX has counter trend properties and trend strength detection, it seems like a strong candidate.

If you guys can't spot any more bugs I'll start working on beta after adding maybe one more indicator. Could someone else add the time filter indicator into EntryFilter2 please?

Files:
 

Sorry for not checking this thread earlier.

Excellent work daraknor - a great idea re forking Phoenix into simple and expert versions. Also, a big thank you for keeping Phoenix alive.

I will start testing the posted versions from next week and post weekly results.

 

Testers

Ok guys all sleeping ?

Enter yesterday at 19h00 for now -2 after a big up and down and up...

 

More great stuff Daraknor.

i want to thank you for all your great work.

 
autumnleaves:
Thanks for the comments Daraknor. The reason that I get sells and not buys with the PAC signal is that I reverse all the Buy/Sell signals in order to convert Phoenix to a trending system. But I need clarification regarding your conclusion. Is there a bug in this code that limits it to either long or short transactions, or did I miss something somewhere? How can the problem be corrected?

Autumnleaves,

Have you checked the updated documentation. In it I added some explanations about the signals. I was under the understanding that only signals 2 and 3 were counter trending signal. I would appreciate it if you would have a look and let me know if I need to change something.

Signal 1 - Moving Average Envelopes

Envelopes they indicate the upper and lower limits of the price range. View a picture of Envelopes.

 If the price goes above the upper envelope that is a Buy Signal.

 If the price goes below the lower envelope that is a Sell Signal.

Signal 2 - Moving Average Comparison 1 - Counter Trend Signal

Two moving averages are calculated using the same time period P_SMAPeriod. The first is for the present timeframe, and the second is for a point in the past, which is a certain number of bars previous.

 If the older MA is greater than the present one that indicates a downtrend price trend. but Phoenix produces a Buy Signal

 If the older MA is greater than the present one that indicates a downtrend price trend. but Phoenix produces a Buy Signal

Signal 3 - OSMA - Counter Trend Signal

Uses OSMA: Calculates the Moving Average of Oscillator and returns its value. Sometimes called MACD Histogram in some systems.

 If the OSMA from 2 periods ago is less that the OSMA of 1 period ago this indicates a rising price trend, but Phoenix produces a Sell Signal.

 If the OSMA from 2 periods ago is less that the OSMA of 1 period ago this indicates a falling price trend, but Phoenix produces a Buy Signal.

Signal 4 - Moving Average Comparisons 2

Two moving averages are calculated, using P_Fast_Period and P_Slow_Period. Phoenix uses a 15-minute timeframe. The timeframes vary from 1 hour 15 minutes to 9 hours 15 minutes in the current pref settings. It subtracts the fast moving average (which should be for the shorter timeframe) from the value of the faster timeframe.

 If the faster moving average is above the slower one by at least P_DVBuySell but not by more than P_DVStayOut Buy.

 If the faster moving average is below the slower one by at least P_DVBuySell but not by more than P_DVStayOut Sell.

 

Daraknor,

I have time for one suggestion today. New stuff in Red.

---- Variables Section

#property copyright "Copyright PhoenixFund under QPL License. www.bestforextools.com/pf/"

#define Buy +1

#define Sell -1

#define None 0

---- Signals Section

{

int Signal=None;

double HighEnvelope1 = iEnvelopes(NULL,0,P_EnvelopePeriod,MODE_SMA,0,PRICE_CLOSE,P_Percent,MODE_UPPER,1);

double LowEnvelope1 = iEnvelopes(NULL,0,P_EnvelopePeriod,MODE_SMA,0,PRICE_CLOSE,P_Percent,MODE_LOWER,1);

double CloseBar1 = iClose(NULL,0,1);

if(CloseBar1 > HighEnvelope1) {Signal=Sell;}

if(CloseBar1 < LowEnvelope1) {Signal=Buy;}

Debug("Signal 1 "+Signal+" HighEnv:"+HighEnvelope1+" LowEnv:"+LowEnvelope1+" Close:"+CloseBar1);

return (Signal);

}

I couldn't compile with Currenttime I used Time[0]

I'll send you my version where I updated this. It's a lot easier for me to understand. You should make sure that I didn't reverse the buy and the sell.

 

Settings

Daraknor,

Could you please post the settings file?

I have everything properly set, but on Strategy Tester I've tried and it doesn't open any trades.

I use FXDD.

Thanks a lot.

 

Hi everyone, sorry I haven't checked the Phoenix thread lately and missed the call for testers, been sick the past few days (but with Phoenix 5.7.0 continue to run in the background of course). I would be happy to help out with the testing of P6. I will set up a new account for P6 over the weekend when I'm more able.

Bert: Way to take the bull by the horn, good job!

Btw, should we open a new thread for P6's testing results or just throw them in with the old thread? 10 guys posting results every 24 hrs equals 50 posts a week! Also, for future thought, to avoid having too many different threads popping up all over the place, some threads can be locked up in the future when it has out lived its purpose, this one for example can be locked up when P7 is released (which may not be necessary if P6 turns out to be the perfect EA)

Reason: