| New signals service! | |
|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Quote:
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? Last edited by daraknor; 03-15-2007 at 07:38 AM. |
|
|||
|
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. |
|
||||
|
Quote:
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. |
|
||||
|
Quote:
double haClose1 = (PRICE_OPEN + PRICE_HIGH + PRICE_LOW + PRICE_CLOSE)*(0.25); Constant Value Description PRICE_CLOSE 0 Close price. PRICE_OPEN 1 Open price. PRICE_HIGH 2 High price. PRICE_LOW 3 Low price. What this line of code does is to add the numberss 0, 1, 2, and 3 together then divide by 4 (essentially) giving an answer of 1.5. Your code would give a sell as long as the currency is below 1.5000 PRICE_OPEN for example is a constant equal to 1. I will post now and amend it in a little while when I have fix for you. This works and produces buys and sells. It uses the open high low and close of the latest period. Quote:
Last edited by Pcontour; 11-12-2007 at 08:49 PM. Reason: Fix an Error |
|
||||
|
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,PRIC E_CLOSE,P_Percent,MODE_UPPER,1); double LowEnvelope1 = iEnvelopes(NULL,0,P_EnvelopePeriod,MODE_SMA,0,PRIC E_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. Last edited by Pcontour; 03-15-2007 at 10:27 PM. |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Phoenix - Development+Suggestions - MQ4 in Post#1 | daraknor | Phoenix | 423 | 08-02-2008 04:40 AM |
| Phoenix 2007 (new thread) | Hendrick | Phoenix | 1326 | 03-27-2008 10:34 PM |
| Phoenix is here! | Hendrick | Phoenix | 374 | 02-06-2008 03:26 PM |
| Phoenix optimization | Prankie | Phoenix | 173 | 10-17-2007 07:24 AM |
| Expert Advisor Upgrader - Turn Simple Into Superb | Scorpion | Tools and utilities | 7 | 04-13-2007 01:01 AM |