Back Testing Anomaly using an EMA crossover strategy
- This topic has 3 replies, 3 voices, and was last updated 5 years ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
Similar topics:
Forums › ProRealTime English forum › ProOrder support › Back Testing Anomaly using an EMA crossover strategy
Hi All
I’ve been working on a code using an EMA crossover strategy on the 1 hour Wall St Index to enter long.
The code has produced good results on optimising, but then I noticed it didn’t enter where I would have expected on some trades on back tested results.
I then did a comparison with a very simple crossover entry built from the wizard & stripped back my code to match it. On back testing I found that the two codes had different results and different entry positions.
I’ve loaded up the two test codes:c(my striped down original code). & SAW DOW 1Hr Long Test 02 (My comparison code built in the wizard).
I’ve also loaded up the equity curve and market entry screens and the results for both codes.
Can anybody explain this as if it is a backtesting anomaly I am wary of the results produced!
Thanks in advance
Steve
PS Please note the codes below are the entry only section of the overall codes, but all the backtesting and results are from running these two same codes
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
//------------------------------------------------------------------------- // Code Name: SAW DOW 1Hr Long Test 01 - Striped Original Code //------------------------------------------------------------------------- // Definition of code parameters DEFPARAM CumulateOrders = False // Cumulating positions deactivated // Prevents the system from placing new orders on specified days of the week daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0 // Conditions to enter long positions indicator1 = ExponentialAverage[28](open)//x1//28 indicator2 = ExponentialAverage[44](open)//x2//44 c1 = (indicator1 CROSSES OVER indicator2) IF c1 AND not daysForbiddenEntry THEN BUY 1 PERPOINT AT MARKET ENDIF //set stops & Targets SET STOP pLOSS 185//x//185 SET TARGET pPROFIT 125//y//300 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
//------------------------------------------------------------------------- // Code Name: SAW DOW 1Hr Long Test 02 - Wizard Generated Code //------------------------------------------------------------------------- // Definition of code parameters DEFPARAM CumulateOrders = False // Cumulating positions deactivated // Prevents the system from placing new orders on specified days of the week daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0 // Conditions to enter long positions indicator1 = ExponentialAverage[28](open) indicator2 = Average[44](open) c1 = (indicator1 CROSSES OVER indicator2) IF c1 AND not daysForbiddenEntry THEN BUY 1 PERPOINT AT MARKET ENDIF // Stops and targets SET STOP pLOSS 185 SET TARGET pPROFIT 125 |
Topic moved to ProOrder forum which is for strategy topics. You posted in the ProBuilder forum which is for indicators. I think that is a better place for it as although your question is about an indicator it is about an indicator in a strategy!
Find exclusive trading pro-tools on