| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Ducks In A Row https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=157 |
Page 4 of 11 |
| Author: | gaheitman [ Fri Jan 06, 2012 9:48 pm ] |
| Post subject: | Re: Ducks In A Row |
Doc, In order to code this baby, we have to use numerical tests for each of your ducks. Our EAs will do the following: A new bar opens on the chart. Time to start evaluating everything and see if we have a trade. Let's look at all the ducks. 1st Duck - EMA cross signalled. Checking a cross is pretty easy. We look at the values of the EMA 3 and the EMA 8 and if they EMA3 is now below EMA8 and last bar it was above it, we know we have a cross. A cross down to be exact, so we are looking for sells. 2nd Duck - the PA is trending in the same direction as the 50 Hmmm. Not sure how we test this. Do we just make sure the last bar closed above/below the EMA 50? Or does it have to be the last three bars? Do they need to all be bullish/bearish? Remember, we can look at the numbers associated with the EMA lines for each bar back as well as the Open/High/Low/Close values of all the candles. 3rd Duck - the RSI is breaking above/below the 45/55. For a sell, does that mean on the previous bar it was above 45 and now it is below at the open of this bar? (Opposite with a buy and using 55.) 4th Duck - the RSI angle is between 12 and 2 o'clock or 4 and 6 o'clock.. For the angle, all we can do is determine the rate of change of the last x bars. So if the RSI needs to drop 6 points or 16 points or 60 points, we can check that. We just need to know which it is and how many bars to look at. If it is more than 1 bar back, do we take the biggest movement over those bars? 5th Duck - Lawgirl's indi showing the same trend on the long side of the M5, H1 & D1. I believe this is another RSI reading. We can check and make sure the RSI values for those time frames are above/below whatever threshold she has in the indicator to point up/down. 6th Duck - CJA SignalBars indi - same, same Don't know about the internals of this one, but we can just read the values and see if they equate to the pictures you are looking at. When I've gotten all my 'Ducks In A Row' I enter on the first candle to open above/below the 3/50EMA - supported by the RSI being clear of the 45/55 RSI. If all of the above come out as sell (or buy) we then look for a candle to open below (or above) the 3 EMA (since I am assuming that price is already on the right side of the 50 EMA based on my interpretation of the second duck and RSI is clear based on the third duck) If we didn't enter on this bar, do we re-evaluate everything on the next bar, or just keep looking for an entry until price goes to the other side of the 50 EMA. Said another way, how long is the trigger valid? One thing that might help you when answering these questions is to open up the data window on your chart and see all the values as you move your mouse from bar to bar. That is the stuff we can "see" in our code, and that is what we have to use to make decisions. George |
|
| Author: | gaheitman [ Sat Jan 07, 2012 1:48 am ] |
| Post subject: | Ducks Indicator |
I'm sure everyone is used to me saying "in order to visualise...." so I won't say it this time.... Attached is the Ducks indicator. Since we are only allowed 8 indicator buffers, I have written the indicator to show only one duck at a time. This should also make it easier to evaluate the correctness of the particular duck. If you want to see more ducks, you just drop another copy on the chart and choose which duck you'd like to see. I have coded "something" for ducks 1-5, but much of it is just guesses. I'll try to add duck 6 over the weekend. The settings: Code: Select all Duck 5 is only valid on 5 minute, hourly and daily charts, since I hard-coded the second timeframe for the lawgirl indy. This is by no means an industrial strength indicator, just a tool to help us track down how to code the indicator. There are likely many bugs in it as well, since I'm kind of rushing in hopes of getting it out in time to make some progress this weekend. WARNING: I'll talk about this in more detail in another post, but the indicator uses the current bar RSI since that's all you can normally have on a chart. Keep in mind that this RSI is calculated on the close of the bar, so it seems terribly accurate when looking at historical data. Don't be fooled! George |
|
| Author: | Aussiedoc [ Sat Jan 07, 2012 2:15 am ] |
| Post subject: | Re: Ducks In A Row |
Sorry boys! It's been rough 1st week of the annual Christmas/January holidays. I've been coping with rampant egos in damaged unfit bodies who can't/won't accept that, good and all as I am, I don't have a magic wand that will fix them -- YESTERDAY! Please accept my humble apologies!!! Getting down to basics... The Pivot rules I was taught are:- 1. a pivot is an indication of a change in trend direction - determined by 5 candles. (1-2-3 candles trending in one direction followed by the 4th, 5th & subsequent candles in the opposite direction.) 2. the 3rd candle is the pivot (swing-high/low). 3. a pivot is not fully formed until either the 4th or 5th candle opens above/closes below the body of the pivot candle. Is this what you need?? Cheers. |
|
| Author: | Aussiedoc [ Sat Jan 07, 2012 3:41 am ] |
| Post subject: | Re: Ducks In A Row |
George, in between patients; I've been having a quick read through your post. Re the above... I'm a bit 'snowed under' at the moment. (It's 1400 Saturday; 35+ degrees. we've got wall-to-wall 'grumpy' damaged people (benefits of a small rural farming/holiday community) wanting 'immediate' attention; I've got a 4HR round trip, shifting a 91YO invalid a couple of 100KMs to more extensive facilities, coming up in the next few minutes - and then, when I get back... It's my turn to cope with all the overnight fun and games until around 0700 Sunday AM.) I should re-surface around 1500 Sunday (GMT +11). Is it OK if I do my best to specifically answer each point then?? Cheers |
|
| Author: | gaheitman [ Sat Jan 07, 2012 4:21 am ] |
| Post subject: | Re: Ducks In A Row |
Absolutely. Good luck with your patients. George |
|
| Author: | SteveHopwood [ Sat Jan 07, 2012 8:27 am ] |
| Post subject: | Re: Ducks In A Row |
Yes, thanks. These are obvious when you look at them on the chart. Did you know that the Fractals indi draws them as well? I can use F to help the EA detect the pivots and they make a good visual confirmation. |
|
| Author: | SteveHopwood [ Sat Jan 07, 2012 8:30 am ] |
| Post subject: | Re: Ducks Indicator |
Fantastic George. I will stop development of the EA whilst you work on this. Once it is up and running, we can replace the existing trade-decision functionality with a single call to your indi. Just a note: Doc uses a smothed ma, not an ema. |
|
| Author: | gaheitman [ Sat Jan 07, 2012 8:46 am ] |
| Post subject: | Re: Ducks Indicator |
Hmmm, the templates have EMAs in them. From the D1 template: <indicator> name=Moving Average period=50 shift=0 method=1 apply=0 color=16711935 style=0 weight=2 period_flags=0 show_data=1 </indicator> <indicator> name=Moving Average period=8 shift=0 method=1 apply=0 color=255 style=0 weight=2 period_flags=0 show_data=1 </indicator> <indicator> name=Moving Average period=3 shift=0 method=1 apply=0 color=65280 style=0 weight=2 period_flags=0 show_data=1 </indicator> |
|
| Author: | SteveHopwood [ Sat Jan 07, 2012 9:02 am ] |
| Post subject: | Re: Ducks Indicator |
It sure does, and that caused me some grief trying to work out why the EMA Crossover indi signals were wrong. In the indi, the ma's are hard-coded as smoothed ma's. I thought your indi was fabulous when I looked at your post. I am blown away now I have set it up on a chart. Time then to open a dedicated automation development thread so that everything can go into one place. This is open at http://www.stevehopwoodforex.com/phpBB3 ... 5129#p5129, and you will find an invitation to use your editing powers as a PCM to edit post 1. I have posted the EA and your indi (you might want to change back to ema) there, along with a template that sets up all five indi's. I am going to remove the EA from Doc's post 1 here. |
|
| Author: | fxozgirl [ Sat Jan 07, 2012 11:49 pm ] |
| Post subject: | Re: Ducks In A Row |
I'll be definitely having a look at this one, Thanks Doc for sharing, Steve, George & crew for your efforts in coding |
|
| All times are UTC | Page 4 of 11 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|