I've been following this thread and today, as an exercise, I decided to try to implement this strategy in EasyLanguage. Unfortunately, it's massively unprofitable when run on 5 min bars over the last two years (the most intraday data that I've got with Tradestation 6). Without commissions and slippage, the numbers are closer to breakeven. I assume I'm missing something but I can't figure out what it is. Is there a directional component on the MACD that needs to be taken into consideration? Is the MACDLimit too low? Maybe I'll mess around with it some more later this week. I've attached the code in a MS Word document since I cannot upload fiiles with a .ELD extension. Because of this, you will have to copy and paste into blank strategies in TS6 to get these to work. There are two strategies - the first is the basic strategy without the MACD filter. The second is with the MACD filter. The default input parameters are as suggested in this thread: (14,1,3) for stochastics with 25/75 as oversold and overbought levels; (5,13,6) for MACD with +/- .04 as the filter level for entry. The rules as implemeted (and as I understand them after reading this thread) are as follows: The Basic Strategy ("Fast Trend") is: - Enter long when both the fast and slow line crosses above the overbought level - Exit longs when both the fast and slow lines crosses below the overbought level - Enter short when both the fast and slow line crosses below the oversold level - Exit short when both the fast and slow lines crosses above the oversold level The Filters that are applied are: - Do not enter long unless the MACD is above the MACDLimit - Do not enter short unless the MACD is below the MACDLimit*-1 None of the early entry techniques discussed were implemented. None of the variations (such as slow trend or the reversals) were implemented either. Hopefully someone will find this useful or, if I'm lucky, be able to tell me what I'm doing wrong. -eLindy
This thread has had some value: 1. It has served jack hershey as a vehicle for assembling a crowd to read his Journal. 2. It has served to point up the differences in people as they listen to a pitchman (jack) deliver his lines. 3. It has allowed me the opportunity to post a file using an idea jack mentioned, starting small and compounding those small efforts. 4. It has given several others temporary employment in defining, through software, ideas jack has posted. Now, the danger is in looking too closely at what jack offers and taking him literally. I use the stochastics indicator, like wally_, and have modified it quite a bit to behave the way I want in different market conditions. You must be willing to hear jack but learn to adapt his techniques, which maybe you haven't tried or which you've maybe overlooked as too simple, to your own situation. Jack, I think, likes to teach and is willing to share his knowledge of the market in general ways. After all, if anyone really knew what was going to happen tomorrow, it would be such a tremendous burden that the person could hardly bear the strain of knowing, even generally, how the market will behave. Jack, I think, is no different. He knows a great deal but to try and say this is the way things will transpire tomorrow is too much to expect of him. I've participated in message boards where a guru arose to lead people to the 'Promised Land' of trading. Cleaning up after the blowup was unpleasant and left several very bruised egos and tempers to contend with. So, I'm just saying don't expect too much of jack and everything should be fine. You'll learn a lot more this way and still be able to walk away with no hard feelings when the time comes. Bruce
Below within the quote I made some suggestions to help you get a starting point that is correct. Basically your MACD is wrong and so are the exits. Both of these things will tend to cahnge the results. The exit will cause a lesser result as blueberry cake says and the MACD being correct should make it better. look for the ***'s You are in luck these are just details that are easily screwed up. As you gt into how markets work and trading it will come more natural to you. after the beginner part is over and you can do wash trades it get fairly intresting. It would be unfair to add wash trades for you cause it defeats finding out how profitable something is and what a win loss ratio is like if a prson is not trying to make money. It is okay to use some of the intermediate stuff and not the others.
JACK Guess I gotta buy you a beer huh. I hope you had a good vacation. I trade price action - no oscillators . Categorize me along with Old Trader. My own inability to find oscillator configurations that worked "well" across the four basic market types, ... ( i.e., balance / transition to trend / trend / transition to balance ), led to frustration with price derivatives, but Not to skepticism as to their potential. I was frustrated only with my own inability to find any strong useable value in them. Your recent post on..... MACD < >0.4 addresses a piece of this. I will work on your many posts, ( old dogs can "TRY" to learn new tricks ). Thanks Jack. Iceman1 .... No claim to fame ........ You may stop waiting. My point is this ... Don't say something to me that I don't understand,......and then go away. I might think the worst. ( my problem ). Unless of course, you come back and clarify things, .....in which case I eat crow and buy you a beer.
I've modifed the code as suggested - the biggest difference was with the modified MACD limit. Going to 0.4 from 0.04 reduced the number of trades to less than 10 over a two year period. That tells me I've misunderstood how the MACD is used to filter the signals. The MACD filter, as I understand it, is as follows: - Do not enter long unless the MACD is above 0.4 - Do not enter short unless the MACD is below -0.4 I have not posted the revised code - I will if I ever figure out the MACD mistake. -eLindy
Okay you are in the ball park now. You will see in the journal that I just want to establish a trend as being there. This means the market is no longer flat. I am using, on the 5 min, a range of MACD (5, 13 ,6) between +.4 and -.4 as the flat zone on the histogram. This is a fine point but I was capturing the magnitude of the initial divergence of the MACD as an indication that a trend is under way. The histogram is just a measure of divergence at all times. As a trend romps along the divergence gets smaller and often varies between plus and minus as the A/D changes during the parts of a trend. If you look at what you are doing it is this. you ignored the "momentarily" which is my obtuse, to some, word for not continually. Since you have made the MACD a continuing requirement along with the Stoc stuff there won't be many trades. So just put it in, momentarily, before or after the one or both lines (14, 1, 3) come into the picture. Once you have entry at the time of the arrival of the second line, then kill the need for the MACD because we have met the momentariness which defines "not flat". I am speculating, since you didn't say, that there were some profits on the ten trades you logged. I bet greenspan helped out on a few of them... be interesting to see the news on those ten trends. you might want to work ahead a little and pick up the Wash trade sequence on back testing so we can see the extent of really doing it often and well when a trend goes no where and we need to exit before losses begin. Once we put stop logs on the table and begin to use them, then we will be watching for the point when no new stops are required. this is going to be our signal to go to the other side of the channel to start to max our exits as far away from stops as possible. These two things will help show how the back testing changes as you emerge from being a beginner. I hope you hang in here with this. It is not often that either maths people or software programmers can get into making money.
It is hard to make the point of how money is made to get to a place to make a living trading. It takes less profit per day than is generally understood. I prefer to stay with one contract until the money velocity gets high enough. But your point of using small profits and adding contracts as cash on hand allows, is okay. These are net gains per day and to get to a reasonable income stream is possible with small daily profits and few contracts. No matter how you choose to express it the whole thing blows up (speaking in a positive manner). Nevertheless as people accumulate capital, i am going to focus on the normal ways all loss prevention enters the picture. the wash trade is always there. there is no reson to use protective stops as exit points. The target/ stop goal setting with entries is null and void form now on as a method from my point of view. With ES it is hard to get to a point where you get partial fills and slippage etc shows up. The market is liquid. A lot of people here will begin to comment on alternative uses of stochastics. There are some lulu's and it takes guts to put them on the table. I like to be supportive of others and I want to go through a transition with this from beginner to other levels.
"If you look at what you are doing it is this. you ignored the "momentarily" which is my obtuse, to some, word for not continually. Since you have made the MACD a continuing requirement along with the Stoc stuff there won't be many trades. So just put it in, momentarily, before or after the one or both lines (14, 1, 3) come into the picture. Once you have entry at the time of the arrival of the second line, then kill the need for the MACD ....." Actually, the code, as is, uses the MACD only momentarily in the manner you described. Unless I'm misunderstanding the term MACD as you use it, my charts show that MACD extremes of 0.4/-0.4 rarely occurs. So, the opportunity for entry into a trade, as defined, rarely occurs. On my charts, many days and sometimes weeks go by without the .4/-.4 extremes being hit. "I am speculating, since you didn't say, that there were some profits on the ten trades you logged. I bet greenspan helped out on a few of them... be interesting to see the news on those ten trends. " 5 trades were made over the prior two years. 3 positive, 2 negative for a net loss (includes commissions and slippage). Profit factor 0.88. -eLindy