|January 13th, 2011, 03:12 PM||#1 (permalink)|
Ventura, California, United St
Futures Experience: Intermediate
Broker/Data: Open E Cry (OEC)
Favorite Futures: RLM, 6E
Posts: 20 since Oct 2010
Thanks: 38 given, 16 received
Hi, I have been working on various systems trying to teach myself Easylanguage and reading a bunch of all your posts which is helping a ton; Thanks!
I am a trend follower and don't need to pick tops and bottoms but I want that chunk out of the middle of trend in the safest and most efficient method I can come up with.
So with all that in mind I keep coming back to moving averages of one type or another to clean and smooth but as you know they can lag pretty bad at times.
So I came up with a three moving average system as follows:
Using the Hull Moving averages (for speed) and a simple moving averages as a zero line for overall trend:
So the Simple MA(Zero Line) is color coded to indicate the location of the closing price via color I have also added an Average True Range cushion around it so when the price gets close to the line you can clearly see it.
A blue dot indicates the closing price is above the slower simple MA and red indicates it's below, if the center line is gray the MA is within the ATR(Middle MA value).
Moving Average (Oscillations/MACD)
The other two moving averages are the Hull Moving averages, In order to have it oscillate I just subtract the hullslowMA from the hullfastMA (MACD).
The coloring of the lines however is as follows if the lines are in contango (i.e. in a rising market fast is on the top, slow is on the bottom and the baseline value is below them) it goes all blue indicating a buy.
I'm still working on a more sound exit strategy I don't believe this system protects enough for the exit side. I am looking at some sort of trailing stop wanting the market to exit the trade
Help: Is it possible in easylanguange to plot a paintbar into window#1, I would like to do it when the MACD crosses over the zeroline.
Like I said I am new to this so if there are best practices to coding what I have done here I would appreciate any feedback...thanks.
// Using the Hull Moving average as the fast and slow, went to a standard moving average for the long term (zero line)
//Center Line Calculation and Coloring
CenterMA= AverageFC(Price, HullCenter);
If close < (CenterMA - var1) then Centercolor = CenterdnColor;
If close > (CenterMA + var1) then Centercolor = CenterUpColor;
If Close = CenterMA then Centercolor = Yellow;
// Calculate Fast and Slow around Centerline
//Contango Using this to define and mark trend when all MA's are H->L in order
If Slowhull<FastHull and Slowhull>CenterMA then Contango=blue;
If Slowhull>Fasthull and slowhull<CenterMA then Contango=Red;
//If Condition1 then PlotPB( High, Low, Open, Close, "Contango", Yellow ) ;
//Would really like to figure out how to plot a Paintbar into Window #1 when HullMACD crosses Centerline
Plot1 (HullMACD,"HullCross", Contango);
Plot2 (HullMACD, "", Contango) ;