Hello
This is a small OnlyLongstrategy with quite acceptable results.
The Detrended Price Oscillator and the power of the candles with the Repulse Indicator are used.
If both > 0.1 we buy a position, if one of the two indicators Short < 0.1 we sold. Buying and selling is quite convenient at the usual times in the Dax at 09.00 / 13.00 / 17.00 and 21.00 hours (utc+2 “Berlin-time”). Who likes can protect the losses and profits in percent and not only via the indicators.
Like all trend-following systems, it has weaknesses in sudden trend changes and range phases, but this strategy still achieves a better result than the Dax itself.
kind regards
JohnScher
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
//------------------------------------------------------------------------- // Repulse DPO Long // Dax 1 Euro Mini // Timeframe 4H // TimeFrame 4H utc+2 "Berlin-Time" // // created by JohnScher with help from rpt //------------------------------------------------------------------------- //------------------------------------------------------------------------- Defparam cumulateorders = false // Defparam cumulateorders = true brings a better absolut (!) result TradingDay = Opendayofweek = 1 or Opendayofweek = 2 or Opendayofweek = 3 or Opendayofweek = 4 or Opendayofweek = 5 TradingTime = time >=090000 and time <=210000 positionsize = 1 // DetrendedPriceOszillaator past data from prt as a code, with help from nicolas p = 3 avg = average[p](close) r = round(p/2) +1 c1 = close - avg[r] c2 = 0.1 // variable as a digit, could be also an indicator //repulse-indicator from prt as a code, with help from nicolas q = 3 a = 100 * (3*close - 2*low - open) / close b = 100 * (open + 2*high - 3*close) / close c3 = Exponentialaverage[q](a) - Exponentialaverage[q](b) c4 = 0.1 // variable as a digit, could be also an indicator // maincode IF TradingDay and TradingTime then If c1 > c2 and c3 > c4 then buy positionsize contracts at market Endif If c1 < c2 or c3 < c4 then sell at market Endif ENDIF // SL and TP Set Stop %Loss 1 // works without too Set Target %profit 3 // works without too // End // regards JohnScher |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
This is dangerous as it doesn’t consider a 50-100 pip swing before the bar close direction.
Yeah, I know that.
It would be nice if you could bring 1, 2 or even 3 suggestions how this danger can be banished. Perhaps together we can optimise the results of the strategy.
Perhaps the answer is just be long above Hourly open and Short below hourly open.
Dear John,
nice strategy, with 1.7 pips average spread and optimising p and q to respectively 3 and 7 outperformes indeed the DAX, it gives a profit of 6.093 Euro over a period from January 2014 to May 2018, with an In Sample result of 4.705 Euro (first 68% of the bars) and Out of Sample 1,388 Euro (remaining 32% of the bars), the Out of Sample result is 62% which sounds relative good.
Also good to know is that with this strategy you are only less then 40 % in the market !
Maybe also good to mention that the first 11 months, from January 2014 to December 2014, profits are ZERO, which is annoying and it would be hard to maintain the strategy if the simulation would have been true during that year !
I did not come up with the baking test results, they were supplied by PRT.
I didn’t go through a change from p and q to 3 or 7.
And times I’m not on the market I haven’t checked either, but I’ll make up for that.
Currently I also have the strategy programmed by someone in MT4 to get a separate backtest. Depending on the result of the backtest from MT4, I then go live on air “Who beats the Dax?
Perhaps the answer is just take Longs above the 4Hourly openprice and Short below the 4Hourly open .
“Perhaps the answer is just take Longs above the 4Hourly openprice and Short below the 4Hourly open ”
Can you rewrite the code accordingly? – my coding skills are very limited.
Sorry John, I do not have much time to. But tested on lesser timefrom for 1hr and 4hr blocks beginning at session open likely a good starting point.
Well, hi,
you are welcome to put the code here, if we achieve better results – no problem
Sorry John I have no time.
Is this trading system expected overnight?
or is it my problem?
I see long at 21 hours, which are closed the next day
Yes, the strategy works overnight.
Open and Closes are at 09.00/13.00/17.00 and 21.00 o´clock “Berlin-Time” on the 4H chart.
There’s a little risk involved, all right.
Hi John
You can cut the number of trades down by about 23% by introducing a “BuyPrice” STOP for entry 2 points above the high. This only reduces overall profits by 5.6% and reduces time in the market by over 4% coupled with an increase in number of winning trades of over 1%.
Oh,
I did not optimize the strategy.
You are welcome to put a modified code according to your approach here.
Hello.
I have updated the code littel bit.
On the one hand I switched to GMT+1.
On the other hand, I optimized the entries and exits using the Optimazingtool via the Repulse, thus slightly improving the result in the backtest.
In the attachment the itf.ile. If there are problems with the download and/or opening, here is the code again
//————————————————————————-
// maincode : Dax Only Long by Repulse and DPO
// timezone GMT+1 new !!
// timframe 4H
// Spread 2
// created by JohnScher
//————————————————————————-
Defparam cumulateorders = false
TradingDay = Opendayofweek = 1 or Opendayofweek = 2 or Opendayofweek = 3 or Opendayofweek = 4 or Opendayofweek = 5
TradingTime = time >=080000 and time 0.01 and Repulse [3] >= 0.21 then // new … 0.0 before
buy position contracts at market
Endif
If Repulse [3] <-0.17 then // new .. 0.0 before
sell at market
Endif
Endif
Set Stop %Loss 5 // stays !!
//Set Target %profit 3
https://www.screencast.com/t/Tc0F6XB5q……………intentando mejorar su estrategia en h1..buena estrategia..yo amante del DPO
https://www.screencast.com/t/QmSXRbBR
https://www.screencast.com/t/2fCW8fkGsOeZ….solo posiciones largas por ahora
https://www.screencast.com/t/MIaSZ2PRg
Hi JohnSher,
Nice but not the same result
Do you have the last itf of it ?
Good result in production ? or it was just a test in demo account ?