Thread: The Greed ea
View Single Post
the rule pattern
  #2 (permalink)  
Old 01-02-2008, 11:00 PM
hayseed hayseed is offline
Sophomore
 
Join Date: Nov 2006
Posts: 73
Thanks: 1
Thanked 22 Times in 18 Posts
hayseed is on a distinguished road
Default 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
Reply With Quote

Registered members have access to special online forex currency trading tools, software, mt4 expert advisors and indicators. Register now

Main Menu

Economic Forecast