COWABUNGA EA CONSIDERATIONS
I got interested in Cowabunga in my search for better entry systems for an automated trader.
These are my observations, thoughts and improvements to the EA.
-
WHAT we are doing is more important than HOW to code this or that aspect. We must always come back to this.
WHAT am I doing with this EA?
I am trying to help code the EA EXACTLY as Big Pippin does it.
-
To really code what Big Pippin is doing, you need to study his blog.
He lays out his rules (in ‘Read this First’ - find it in the blog) but you also have to look carefully at what he DOES, as the rules are not always precisely stated.
I have observed that unless - perhaps - a trader has a strong math/science type background, his statement of the rules is likely to be “in the ballpark”, but not precise enough to code and get good results.
For example, Big Pippin does not necessarily trade on the same bar as an MA cross, or the next bar.
So, for how many bars after each timeframe’s cross is a trade valid?
That is the kind of rule that can be coded and a computer can follow.
On the 4 Hour chart he takes the trend as EMA 5 above (or below) the EMA 10, for many bars after the cross, essentially until the re-cross.
But on the M15 chart he usually trades soon after the MA cross. I have set it up for 5 bars, but you can experiment, changing the variable ‘MaxMACrossShift’ in the Strategy Tester, “Expert Properties” screen. I have not reviewed all of Big Pippin’s blog to find what is the value that 90 or 95% of his trades fall within, (4 bars? 10 bars?) so I eyeballed a bunch and started with 5.
- A bar’s time is the OPEN time. For backtesting, the close of the current bar is not usable, I believe because it is already known to the program when the bar opens: but you can use the OPEN of the current bar, and for consistency, prior bars. OR use Closes up to the previous bar.
It would be interesting to backtest two versions AFTER all else is correct, to compare using OPENs up to the current bar (shifts of 0 and 1), to the present code which has closes of the previous two bars (shifts of 1 and 2). the differences would not be great I think, but we could be surprised.
CODING SPECIFICS:
-
Solved: Not taking trades. Because of coding logic: it only took a trade ON the 4 Hour crossover bar, but Big Pippin actually considers the Main trend as when (for long) the 5 EMA is above the 10 EMA. This is true for many bars at a stretch.
-
Need to use Metatrader’s OSMA, not MACD, to match Big Pippin’s charts. Kept this.
-
Added code to prevent a trade opening on the same bar as a close of trade. Avoids unprofitable mess
-
I setup Profit and Maxstop in pips instead of decimals, for ease of use.
-
Added a MinStop to always give the price some “wiggle room”.
Setting MaxStop to 500 and MinStop to 0 effectively nullifies them.
MaxStop and MinStop would ideally not be there if all Big Pippin’s rules are coded, and work well.
-
Corrected coding errors in the exits (*Point).
-
Recoded the initial stoploss calculations to occur before order entry. Orders should have stops in case your connection fails.
-
Changed some of the logic to more closely match what Big Pippin does.
WORK NEEDED TO BE DONE
Add Money management. I prefer simple code based on Larry William’s system. This is to keep you out if the stop is too wide, per Big Pippin.
Exits. Code the exits as Big Pippin describes and shows. A TakeProfit of 20 or 30 is not what the doctor ordered.
And also code the “exit by 4 PM.”
Close trades before news events.
I hope someone else can tackle this.
Many of these are contained in EA’s at ForexTSD. (I read a lot at ForexTSD.)
Testing! If you find some consistently profitable settings let us know!
FINAL THOUGHTS
I do not ever expect a perfect match between the EA and Big Pippin’s trades. A 2/3 correlation would be quite good.
WARNING: Even if profitable this program is not safe to trade with real money as it does not have sufficient error handling, etc.
Final Point: I repeat:
WHAT we are doing is more important than HOW to code this or that aspect. We must always come back to this.
WHAT am I doing with this EA?
I am trying to help code the EA EXACTLY as Big Pippin does it.
(That will also give us a reference to try changes and compare to the ‘pure’ Cowabunga system.)
Let us know what you find out with it!