My automatic scalp system for dax
Forums › ProRealTime English forum › ProOrder support › My automatic scalp system for dax
- This topic has 6 replies, 2 voices, and was last updated 8 years ago by Alco.
-
-
12/08/2016 at 2:10 PM #18062
Hello guys,
Im new here and trying for the first time to build my automatic system for 10 min charts. But it shows good results for 15 min charts aswell.
I have no knowledge about programming at all, but at the first backtests of this system… it seems to work pretty well! With some help it could be a very profitable system.
The code you see below.
You also need to use the ”’turtle indicator” what I found somewhere on the internet.
I’ve also used the momentum indicator ”30” and the directional movement indicator ”14”Buy when momentum is in green and directional movement d+ is above 25
Sell when momentum is in red and directional movement d- is above 25123456789101112131415161718Turtle IndicatorEMA3 = ExponentialAverage[3](close)EMA5 = ExponentialAverage[5](close)EMA8 = ExponentialAverage[8](close)EMA10 = ExponentialAverage[10](close)EMA12 = ExponentialAverage[12](close)EMA15 = ExponentialAverage[15](close)EMA30 = ExponentialAverage[30](close)EMA35 = ExponentialAverage[35](close)EMA40 = ExponentialAverage[40](close)EMA45 = ExponentialAverage[45](close)EMA50 = ExponentialAverage[50](close)EMA60 = ExponentialAverage[60](close)//Scalp systemRETURN EMA3 COLOURED(0,0,255), EMA5 COLOURED(0,0,255) ,EMA8 COLOURED(0,0,255) , EMA10 COLOURED(0,0,255) ,EMA12 COLOURED(0,0,255) , EMA15 COLOURED(255,0,0) ,EMA30 COLOURED(255,0,0), EMA35 COLOURED(255,0,0),EMA40 COLOURED(255,0,0), EMA45 COLOURED(255,0,0),EMA50 COLOURED(255,0,0), EMA60 COLOURED(255,0,0)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivated// Conditions to enter long positionsignored, ignored, ignored, ignored, ignored, indicator1, ignored, ignored, ignored, ignored, ignored, ignored = CALL "turtle indicator"ignored, ignored, ignored, ignored, ignored, ignored, ignored, ignored, ignored, ignored, ignored, indicator2 = CALL "turtle indicator"c1 = (indicator1 >= indicator2)indicator3 = DIplus[14](close)c2 = (indicator3 > 25)indicator4 = Momentum[30](close)c3 = (indicator4 > 0)IF c1 AND c2 AND c3 THENBUY 1 CONTRACT AT MARKETENDIF// Conditions to exit long positionsindicator5, ignored, ignored, ignored, ignored, ignored, ignored, ignored, ignored, ignored, ignored, ignored = CALL "turtle indicator"ignored, ignored, ignored, ignored, ignored, ignored, ignored, ignored, ignored, ignored, ignored, indicator6 = CALL "turtle indicator"c4 = (indicator5 CROSSES UNDER indicator6)indicator7 = Momentum[30](close)c5 = (indicator7 > 0)indicator8 = DI[14](close)c6 = (indicator8 >= 25)IF c4 AND c5 AND c6 THENSELL AT MARKETENDIF// Conditions to enter short positionsignored, ignored, ignored, ignored, ignored, indicator9, ignored, ignored, ignored, ignored, ignored, ignored = CALL "turtle indicator"ignored, ignored, ignored, ignored, ignored, ignored, ignored, ignored, ignored, ignored, ignored, indicator10 = CALL "turtle indicator"c7 = (indicator9 CROSSES UNDER indicator10)indicator11 = Momentum[30](close)c8 = (indicator11 < 0)indicator12 = DIminus[14](close)c9 = (indicator12 > 25)IF c7 AND c8 AND c9 THENSELLSHORT 1 CONTRACT AT MARKETENDIF// Conditions to exit short positionsindicator13, ignored, ignored, ignored, ignored, ignored, ignored, ignored, ignored, ignored, ignored, ignored = CALL "turtle indicator"ignored, ignored, ignored, ignored, ignored, ignored, indicator14, ignored, ignored, ignored, ignored, ignored = CALL "turtle indicator"c10 = (indicator13 CROSSES OVER indicator14)IF c10 THENEXITSHORT AT MARKETENDIF// Stops and targetsSET STOP pLOSS 10SET TARGET pPROFIT 5It has a very low drawdown as you can see in the picture
12/08/2016 at 2:17 PM #18065Hi Alco, and thank you a lot for sharing your code, much appreciated.
Haven’t test your strategy myself, but I think it could suffer from the “0 bar” behaviour of probacktest. How much trade last 0 bar in the probacktest results? Does it have much trades that open and close on the same candlestick? Seems to have some, because of “Avg time in the market” of 0.29 bars.
12/08/2016 at 2:22 PM #1806812/08/2016 at 2:28 PM #1807112/08/2016 at 2:35 PM #18072In my momentum indicator set to 30, I added the wilders ‘smoothing average ”19”. For a buy, the momentum needs to be above the wilders average. For short traders the momentum needs to be below the wilders smoothing average. I don’t know how to adapt it in the code.
Trading hours are 08:00-22:00
12/08/2016 at 2:52 PM #18075Ok so obvisouly you are not aware of the 0 bar problem. Please have a look at the video of this post which expose the problem and the new backtest engine to come with the PRT 10.3 version: http://www.prorealcode.com/blog/video-tutorials/tick-tick-backtest-engine-probacktest/
Because there must be a lot of takeprofit and stoploss price levels contained in the orders’entries bars, and because takeprofit are always tested before the stoploss, the backtest result you get here is not good. Unless you have the new PRT version, there’s not much to do to avoid the problem.
12/08/2016 at 3:23 PM #18077 -
AuthorPosts
Find exclusive trading pro-tools on