The Greed ea
|
|||
|
this is a stripped down version of my greed ea...... the name is misleading….. rather than make it all, it is trying to evalulate it all….. and evalulate it all in a truly level playing field manner….. many times fellow traders will present us with rules , take oilxpro’s recent hma rules for example….. the rules may be excellent but how do they stack up to other rules we might know of…… better, worse, equal,….. how do drawdowns, payout, number of trades and such compare…… how do we compare the results all of the hundreds of rules with a wide varity of differeing filters applied to each.... the greed ea can do it.........
the reason for the reduced version is that the full version is truely huge and needs computer resources not available to us all…. what would be the point in me presenting an ea that only few could get to load….. even this reduced version will be slow on most computers….. you can of course remove lines of code of no use to you to speed things up….. rather than use my money management, position size, and trailing stop codes, I’ve used the code version’s we commonly see in other ea’s on the net….. again , this is to lower the computer resource load…. when we toss oilxpro’s rules into greed and run a full test we can see just how things add up and in a test that’s truly fair to all …… numbers 201 to 280 represent oilxpro’s hma rule or at least my version of them….. what I did was to take the rule string //-------------------------------------------------------------- hma4_1 > hma4_2 && hma6_1 > hma6_2 && hma8_1 > hma8_2 && hma10_1 > hma10_2 && hma20_1 > hma20_2 && hma40_1 > hma40_2 && hma80_1 > hma80_2 && hma200_1 > hma200_2 && hma420_1 > hma420_2 && long //------------------------------------------------------------- and reduce them 1 line at a time which turned that 1 rule into 9 ….. so now as an example, we run an optimized test where buy ranges from 1 to 280….. run that on the eurusd for the entire 2007 , long trades only….. the test should reveal many of oilxpro’s hma rules at the top of the profit list….. which to me implies further study of those rules should be considered….. below is my backtest report.... of course we can just run a backtest on a single number and vary the stoploss, profit and such…. but if you try to run a full test on all numbers and vary profit, stop, trailing stop and such, be prepared to have a good machine or plenty of time….. the periods and/or levels for the indicators for the chart under test are set in the chart settings section….. the settings for the day filters are set under the day filter settings…… and the week settings are under week filter settings…… i’ve removed two thirds of the rules and filters but enough is left to give you a feel of what’s going on ….. h |
![]() |
the rule pattern
|
|||
|
i’ve remove 2/3 of the buy/sell rules and filters to make it useable but the ea can be rewritten to include improved filter rules…. and hopefully fellow traders will suggest some additional filters for us all…..
this version contains many of the commonly seen buy/sell rules….. you can see the pure rule is 1, 11, 21 31 and so on…. then the following numbers such as 2 thru 10 contain the pure rule with a corresponding filter…. the periods of the filter and any level it might use are adjustable…. keep in mind, the filters are as important as the rules...... remember the overall purpose here is to evaluate….. so if we run a full test and notice numbers ending in 2 are often the best , we might conclude using the dayrsi is a good filter…. the dayrsi is always used in a rule ending in a 2…. or if we see a lot of numbers ending in 5, we might conclude the daymacd is a good filter….. the daymacd filter is always used the rules ending in 5….. look closely at the mq4 code and you’ll see the pattern…… here is the first set 1 thru 10 so you can see the outline….. if(buy == 1 && validtime ) buy at preset time if(buy == 2 && validtime && dayrsibuy) with dayrsi above preset level if(buy == 3 && validtime && dayadxbuy) with day +adx above -adx if(buy == 4 && validtime && weekstochbuy) with day stoch above it’s signal if(buy == 5 && validtime && daymacdbuy) with daymacd above its signal if(buy == 6 && validtime && daysatlbuy) with day close above satl if(buy == 7 && validtime && weekrsibuy) with week rsi above preset level if(buy == 8 && validtime && weekmacdbuy) with macd above its signal if(buy == 9 && validtime && weekrvibuy) with week rvi above its signal if(buy == 10 && validtime && weekccibuy) with week cci above preset level and here are the following pure rules ….. each will have the exact filter as above in the same order as above…. Look at the mq4 code if it’s not clear…. if(buy == 11 && buyhigh ) buy when close is higher than prior high if(buy == 21 && buyhighclose ) buy when close higher than prior high and above moving average if(buy == 31 && stochcrossbuy ) buy when stoch crosses above its signal if(buy == 41 && stochcrosslevelbuy ) buy when stoch closes above a preset level if(buy == 51 && adxcrossbuy ) buy when adxplus crosses above adxminus if(buy == 61 && rsicrossbuy ) buy when rsi closes above preset level if(buy == 71 && rvicrossbuy ) buy when rvi crosses above its signal if(buy == 81 && willrcrossbuy ) buy when fast willrma crosses above slow willma if(buy == 91 && macrossbuy ) buy when fast ma crosses above slow ma if(buy == 101 && macdcrossbuy ) buy when macd crosses abve it’s signal line and macd is below 0 look at the mq4 code to see what I did to oilxpro’s hma rules….. all in all it might seem confusing at first but if you print out the buy rules you'll quickly see the pattern......h |
|
||||
|
Hayseed
Thanks I liked result no 15 due to risk reward ratio.Could you please tell us what the settings for the optimisation 15 65 2036.57 92 2.34 22.14 343.24 3.23 Is this for use only 1 m or any time frame ? Regards Oilfxpro
__________________
pro-expert-advisors,com |
settings
|
|||
|
hey oilxpro.... 15 is
if(buy == 15 && buyhigh && daymacdbuy) {EnterLong = True;} which only uses the standard daily macd(12,26,9) as a filter.... it buys when the close is higher than the prior high on the timeframe being tested but only when the macd is above its signal line on the daily timeframe.... all settings used throughtout are pretty much the standard ones.... rsi(5), adx(14), macd(12,26,9), rvi(10), cci(14) and so on..... they are adjustable but preset at common settings... one minute time frames if used for quick scalping type trades seem to benifit from aditional filters..... unfortunately that was much of the code i stripped out.... depending on your profittarget, additional 30 minute and hour filters can help..... another thing i took out that now wish i hadn't was a master moving average condition.... that 1 condition over rode all others ..... i'll write something up for 1 minute timeframes so we can test..... do you find 1 minute time frames work best.....h |
test result
|
|||
|
let me better explain the test result in post 1....
in that test there was only one variable being optomised, so to speak.... it was the buy rule.... and really we were not optomising, we were just testing all rules in one single test.... those rules were numbered 1 to 280.... the first column in the test is labeled "pass".... ordinarily we would not focus on that column..... but here the pass correlates to a precise rule.... so pass 1 is rule 1, pass 2 is rule 2 and so on.... and there is a pattern to the filters used also..... once you get a grasp on it , it's a simple matter to know exactly what pass 11 is .... if you look at the result you'll see pass 272 placed first in the table.... and pass 272 is of course rule 272 which is if(buy == 272 && dayrsibuy && hma4 > hma41) {EnterLong = true;} ...... so we can at a glance see which rule worked best and also which filter worked best......h |
|
||||
|
Wow... great work Hayseed.... Keep it up!
__________________
F r e e___F o r e x___E b o o k s___a n d___S t u f f s ![]() -> Cheap MQL Coding service for your EA/indicator is Here <- <- |
|
||||
|
Hayseed
I am lost with this one. What time frame do we use and what settings ? Any chance of making a copy of with preset 15?I am not getting the results you get with opmisation OILFXPRO
__________________
pro-expert-advisors,com |
|
||||
|
__________________
pro-expert-advisors,com |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
All times are GMT. The time now is 09:35 PM.
Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Registered members have access to special online forex currency trading tools, software, mt4 expert advisors and indicators. Register now











F r e e___F o r e x___E b o o k s___a n d___S t u f f s 
Linear Mode

