Hello,
I’ve finished working with this program and before I start using it, I was wondering if someone could give it a look and tell me what faults, if any that there are and make suggestions
Its my first ProOrder build,
// 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 = Average[10](close)
indicator2 = ExponentialAverage[50](close)
c1 = (indicator1 CROSSES OVER indicator2)
indicator3 = RSI[14](close)
c2 = (indicator3 CROSSES OVER 24)
IF (c1 OR c2) AND not daysForbiddenEntry THEN
BUY 1 PERPOINT AT MARKET
ENDIF
// Conditions to exit long positions
indicator4 = ExponentialAverage[73](close)
indicator5 = Average[17](close)
c3 = (indicator4 CROSSES OVER indicator5)
indicator6 = RSI[14](RSI[14](close))
c4 = (indicator6 CROSSES OVER 70)
IF c3 OR c4 THEN
SELL AT MARKET
ENDIF
If not OnMarket then
// Do your Buy or Sell thing.
Endif
// or :
If not LongOnMarket then
// Do your Buy thing.
Endif
// or :
If ShortOnMarket then
// Do your Exit Short thing.
Endif
// Conditions to enter short positions
indicator7 = ExponentialAverage[98](close)
indicator8 = Average[18](close)
c5 = (indicator7 CROSSES OVER indicator8)
indicator9 = RSI[14](RSI[14](close))
c6 = (indicator9 CROSSES UNDER 78)
IF (c5 OR c6) AND not daysForbiddenEntry THEN
SELLSHORT 1 PERPOINT AT MARKET
ENDIF
// Conditions to exit short positions
indicator10 = Average[29](close)
indicator11 = ExponentialAverage[77](close)
c7 = (indicator10 CROSSES OVER indicator11)
indicator12 = RSI[14](RSI[14](close))
c8 = (indicator12 CROSSES UNDER 34)
IF c7 OR c8 THEN
EXITSHORT AT MARKET
ENDIF
If not OnMarket then
// Do your Buy or Sell thing.
Endif
// or :
If not LongOnMarket then
// Do your Buy thing.
Endif
// or :
If ShortOnMarket then
// Do your Exit Short thing.
Endif
// Stops and targets
SET STOP pLOSS 20
SET TARGET pPROFIT 124
Over-optimized, I would say.
what does that give with “standard” MM values ?
do you have screens about the backtest of it ?
also do a test with a trailing stop
Moving averages allow you to curve fit anything perfectly to the past by finding out seemingly “ideal” period lengths. Usually, this does not work well in reality.
I always use fixed, logical MAs and build the strategy on them. But never again optimize the MAs afterwards. I also had to learn first.
first pic is a 10 year backtest of your algo, second pic is after a quick and dirty revision – % stop and target, trailing stop, refreshed all the numbers.
not too bad for a first effort. Interesting that you’re using an RSI of the RSI … I’d never seen that before but it seems to work.
I always use fixed, logical MAs and build the strategy on them. But never again optimize the MAs afterwards. I also had to learn first.
What is a good, logical and fixed MA for you ?
EMA200 or as a tandem EMA55 and EMA89, for example, seems to work well. In this case, it is more about the proportions of the course than an exact line. My opinion.
in DAX ? on all time scales ? sounds a little like the magical Fibonacci numbers
Not just in the DAX, everywhere. There is no such thing as magic. I think you only need a fixed size as a trend line for example or something similar and build the other sizes of the strategy around it without changing this size again at some point. So I try and it seems to work fine without over-optimizing.
OK Thanks for the advice,
So, I pick SMA & EMA values and stick to them, So, SMA would be 20 Period and EMA would be 50 Period ?
What can be optimised? e.q. RSI 14, MACD 12,26,9 Can those numbers be optimised and by how much?
Thanks for taking the time to respond
This is not science. There are no reproducible numbers. You have to find out yourself what methods work for you and which do not.
Exactly, sometimes one works, sometimes the other. It always depends on how the respective market behaves in exactly this time frame. I think … Here’s a little example of me with just one EMA. The system has been successful for over 8 years, for whatever reason with this EMA. But it works.
RSI-EMA EurUsd M15
@Nicolas : Happiness is now.