please review my strategy Code Completed
Forums › ProRealTime English forum › ProOrder support › please review my strategy Code Completed
- This topic has 17 replies, 6 voices, and was last updated 4 years ago by
Nicolas.
-
-
08/18/2021 at 12:51 PM #175611
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,EURGBP 1Hour Chart using 3 years of Data12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivated// Prevents the system from placing new orders on specified days of the weekdaysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0// Conditions to enter long positionsindicator1 = 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 THENBUY 1 PERPOINT AT MARKETENDIF// Conditions to exit long positionsindicator4 = 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 THENSELL AT MARKETENDIFIf 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 positionsindicator7 = 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 THENSELLSHORT 1 PERPOINT AT MARKETENDIF// Conditions to exit short positionsindicator10 = 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 THENEXITSHORT AT MARKETENDIFIf 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 targetsSET STOP pLOSS 20SET TARGET pPROFIT 12408/18/2021 at 2:05 PM #17561408/18/2021 at 3:38 PM #17561708/18/2021 at 5:12 PM #175624Moving 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.
1 user thanked author for this post.
08/18/2021 at 6:38 PM #175626I always use fixed, logical MAs and build the strategy on them. But never again optimize the MAs afterwards. I also had to learn first.
1 user thanked author for this post.
08/18/2021 at 6:45 PM #175627first 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.
1 user thanked author for this post.
08/18/2021 at 6:48 PM #175632I 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 ?
1 user thanked author for this post.
08/18/2021 at 6:53 PM #175634EMA200 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.
2 users thanked author for this post.
08/18/2021 at 6:56 PM #175635in DAX ? on all time scales ? sounds a little like the magical Fibonacci numbers
1 user thanked author for this post.
08/18/2021 at 7:04 PM #175636Not 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.
08/18/2021 at 7:06 PM #17563708/18/2021 at 7:24 PM #175638OK 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
08/18/2021 at 7:52 PM #17564208/18/2021 at 8:27 PM #175644Exactly, 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.
08/18/2021 at 8:40 PM #175645 -
AuthorPosts
Find exclusive trading pro-tools on