SHORT EUR USD (m15) // PAC MAN STRATEGY
Forums › ProRealTime English forum › ProOrder support › SHORT EUR USD (m15) // PAC MAN STRATEGY
- This topic has 85 replies, 16 voices, and was last updated 4 years ago by Vonasi.
Tagged: Break Even, BreakEven
-
-
06/01/2018 at 2:29 PM #71953
To assist with preventing trading during bullish trends we can apply the concept of RSI Ranges:
https://blog.elearnmarkets.com/effectively-trade-using-rsi-andrew-cardwell-way/For example, the code will be as follow:
12345If highest[3500](RSI[30](close)) > 80 ThenPositionSize = 0ElsePositionSize = 1EndIfThis will prevent trading if we get a maximum RSI value exceeding a value of 80 on the RSI 30 period (which could signify a potential bullish trend).
Variables to optimize would include x, y and z: highest[x](RSI[y](close)) > z
2 users thanked author for this post.
06/27/2018 at 8:02 AM #74476I’ve had two versions of this strategy on forward demo test for over a month now so just thought that I would post the results here so far.
The first version is this which I think is the original from Balmora74 and has been on test since 19 May 2018:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263//-------------------------------------------------------------------------// Main code : PacMan BALMORA74//-------------------------------------------------------------------------// PAC MAN - PIP HUNTER// EUR / USD (M15)// By BALMORA74 19.05.2018DEFPARAM CumulateOrders = falseDEFPARAM Preloadbars = 4000//VARIABLESx = 100MoneyManagement = 1 //0, 1or 2RiskManagement = 0 //0 or 1Capital = 10000MinBetSize = 1RiskLevel = 5Equity = Capital + StrategyProfitIF MoneyManagement = 1 THENPositionSize = Max(MinBetSize, Equity * (MinBetSize/Capital))ENDIFIF MoneyManagement = 2 THENPositionSize = Max(LastSize, Equity * (MinBetSize/Capital))LastSize = PositionSizeENDIFIF MoneyManagement <> 1 and MoneyManagement <> 2 THENPositionSize = MinBetSizeENDIFIF RiskManagement THENIF Equity > Capital THENRiskMultiple = ((Equity/Capital) / RiskLevel)PositionSize = PositionSize * (1 + RiskMultiple)ENDIFENDIFPositionSize = Round(PositionSize*100)PositionSize = PositionSize/100// STRATEGYCv1 = (close < Average[100]) and (Average[50] < Average[50](close[1]))Cv2 = RSI[14](close) <= 28Cv3 = STD[10](close) >= 10.93 * pipsizeCv4 = close <= BollingerDown[13](close[2])OKSHORT = cv1 and cv2 and Cv3 and Cv4IF OKSHORT thenSellshort PositionSize CONTRACT at marketSET STOP pLOSS 52SET TARGET PPROFIT 25ENDIF//EXIT ZOMBIE TRADE//IF POSITIONPERF < 0 THENIF shortOnMarket AND BARINDEX-TRADEINDEX(1)>= x and close > TradePrice THENEXITSHORT AT MARKETENDIF//ENDIF…and the results so far:
I have also had on test for a slightly shorter time a slightly modified version for comparison.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061//-------------------------------------------------------------------------// Main code : PacMan v2//-------------------------------------------------------------------------// PAC MAN v2 - PIP HUNTER// EUR / USD (M15)// By BALMORA74 19.05.2018 - Vonasi modifications 20-5-18DEFPARAM CumulateOrders = falseDEFPARAM Preloadbars = 4000MoneyManagement = 0 //0, 1or 2RiskManagement = 0 //0 or 1Capital = 10000MinBetSize = 1RiskLevel = 20Equity = Capital + StrategyProfitIF MoneyManagement = 1 THENPositionSize = Max(MinBetSize, Equity * (MinBetSize/Capital))ENDIFIF MoneyManagement = 2 THENPositionSize = Max(LastSize, Equity * (MinBetSize/Capital))LastSize = PositionSizeENDIFIF MoneyManagement <> 1 and MoneyManagement <> 2 THENPositionSize = MinBetSizeENDIFIF RiskManagement THENIF Equity > Capital THENRiskMultiple = ((Equity/Capital) / RiskLevel)PositionSize = PositionSize * (1 + RiskMultiple)ENDIFENDIFPositionSize = Round(PositionSize*100)PositionSize = PositionSize/100Cv2 = RSI[14](close) <= 28Cv3 = 0For i = 11 to 14 DoIF average[8](STD[i](close)) >= STD[i](close[3]) THENCv3 = 1ENDIFNEXTOKSHORT = cv2 and Cv3IF OKSHORT thenSellshort PositionSize CONTRACT at marketSET STOP pLOSS 64SET TARGET PPROFIT 25ENDIF//EXIT ZOMBIE TRADEIF shortOnMarket AND BARINDEX-TRADEINDEX(1)>= 100 and close > TradePrice THENEXITSHORT AT MARKETENDIFThe results for that since 23 May 2018 are:
To compare results over the same time period you need to deduct the first two trades off of the first version which were two wins for a total of £50. So the original is £46.72 up and the modified version £75 up. Make of it what you want as there is not much in it so far. Neither is lighting any great fires but at least neither of them is in a loss either. I’ll keep them on test until I need the space for something else.
06/27/2018 at 9:26 AM #7450306/27/2018 at 11:31 AM #74523I did used to play it a lot on an arcade machine when I was a lot younger at my favourite rock club – but I was never any good at it. It may or may not have been due to the fact that it was usually at two o’clock in the morning and usually after ten pints of beer.
Not sure why Balmora74 called it the PacMan strategy – maybe because it gobbles up candles in a downward direction? Maybe Balmora74 can tell us?
06/27/2018 at 5:58 PM #74560Exactly Vonasi !! The strategy gobbles up “red” candle like Pac Man who gobbles “ghost” 🙂
The idea is to let go of Pac Man in the middle of the labyrinth represented by the price curve and ask him to hunt a maximum of red candles!
So much for the analogy with video games…
And thanks for sharing you results after one month in demo account.
I have test it on a real account with the same result.
06/28/2018 at 8:57 AM #74594An interesting side effect is the positive overnight fees if a position is held at 2200. I have not had any other strategies running on the EUR/USD so I was able to go back through my IG account and add up the fees for this market since I started the forward testing up until today. The total is +£10.32.
So I then went back through the performance report and noted how many times each version of the strategy held a position overnight. The original Balmora74 version held 7 positions overnight and my modified version held overnight 12 times. This is probably due to the fact that my version was in the market for an average of 9H 30m and Balmora74’s was only on the market for 6H 42m. Without matching each overnight payment to each position it is impossible to accurately say how much each strategy actually earned in overnight fees but we can guesstimate from the numbers that my version earned about £6.52 and Balmora74’s about £3.80
It feels weird to be happy that a strategy is on the market for longer and holding overnight as often as possible – but it is more profitable. Fees of £6.52 represent an increase of 8.7% on the £75 strategy profit and £3.80 is an increase of 8.1% on the £46.72 strategy profit. Not to be sniffed at.
I might have to start looking at other shorting forex ideas!
06/28/2018 at 9:30 PM #74654An interesting side effect is the positive overnight fees if a position is held at 2200. I have not had any other strategies running on the EUR/USD so I was able to go back through my IG account and add up the fees for this market since I started the forward testing up until today. The total is +£10.32.
So I then went back through the performance report and noted how many times each version of the strategy held a position overnight. The original Balmora74 version held 7 positions overnight and my modified version held overnight 12 times. This is probably due to the fact that my version was in the market for an average of 9H 30m and Balmora74’s was only on the market for 6H 42m. Without matching each overnight payment to each position it is impossible to accurately say how much each strategy actually earned in overnight fees but we can guesstimate from the numbers that my version earned about £6.52 and Balmora74’s about £3.80
It feels weird to be happy that a strategy is on the market for longer and holding overnight as often as possible – but it is more profitable. Fees of £6.52 represent an increase of 8.7% on the £75 strategy profit and £3.80 is an increase of 8.1% on the £46.72 strategy profit. Not to be sniffed at.
I might have to start looking at other shorting forex ideas!
Exactly. Positive overnight fees improve the strategy profit. It’s a really interesting property of short strategies…
This code is inspired by long hours of observation of price developments on this currency pair.
I tried to adapt the code on other timeframes and currency pairs but without success for now ! Its seems to work only on EUR / USD M15….
06/28/2018 at 10:22 PM #74657It will be interesting to compare the two versions again in a few weeks time. The last trade for your version was a loss and a win for my version so comparing over the same test period yours is now in a slight loss and mine £100 up. Hopefully in a few weeks time we will have an answer as to which is the winner! Although I just noticed that I am running your version with my money management turned on and my version with it turned off. I won’t change it now as I don’t think it will make much difference at this stage of the strategy test period.
06/28/2018 at 10:37 PM #74658It will be interesting to compare the two versions again in a few weeks time. The last trade for your version was a loss and a win for my version so comparing over the same test period yours is now in a slight loss and mine £100 up. Hopefully in a few weeks time we will have an answer as to which is the winner! Although I just noticed that I am running your version with my money management turned on and my version with it turned off. I won’t change it now as I don’t think it will make much difference at this stage of the strategy test period.
Yes Nice idea and very interesting to have the results in a few months.
Other things with a 200k backtest tick by tick :
- Number of positions = 1214 (Balmora74 code) versus 986 (Vonasi code) = better overnight fees profit with Balmora74 code
- Less DrawDown with Balmora74 code
- A better Profit Factor with Vonasi Code (1.47) versus Balmora74 Code (1.45)
May the best win !! ( a beer 🙂 )
06/28/2018 at 11:01 PM #74659Number of positions = 1214 (Balmora74 code) versus 986 (Vonasi code) = better overnight fees profit with Balmora74 code
That would depend on length of time on market. My version has a looser stop loss so will likely be on the market longer per trade – so less trades but more chance of being held overnight per trade. It may just even out. May the best strategy win (or at least not lose as much as the other one)!
Could you post the 200k results just for interest (I only have 100k at the moment as my 200k account was limited risk so I didn’t use it enough and IG decided to close it – no great loss as I do daily strategies normally anyway)
06/29/2018 at 6:46 AM #7466606/29/2018 at 6:47 AM #7466806/29/2018 at 6:47 AM #7467106/29/2018 at 7:48 AM #74681Thanks for posting those. The differences are very small between the two. My version has slightly more profit overall which is always the end goal and I notice that your version is on the market for 15% of the time but mine is on for 25% of the time so that is a much higher probability of being on the market at the 2200 fees add on time. The draw down on mine is bigger as would be expected with a larger stop loss but both draw down levels are of very manageable size. The extra draw down on my version is more than compensated for by the extra run up which if coupled with money management could be compounded into even more profit (for example if fixing stakes at a % of capital and not reducing stakes after a loser).
I notice that the number of positions opened is not how you listed it in the earlier post. My version opened 1468 positions and your version only 1220.
07/27/2018 at 8:54 AM #76853I have now had Balmora74’s version of his PacMan strategy and my slightly tweaked version v2 on forward demo test for a couple of months now. Here are the results so far:
We need to deduct two trades from the Balmora74 version (as I started it slightly earlier) so that we can compare the exact same test period. These trades were two wins totalling £50. So Balmora74’s version has produced a loss of -£11.80 and a win rate of 17 wins in 26 trades which equals a 65.38% win rate. My v2 has faired a little better with a gain of +£138.60 in more trades at a higher win rate. 21 wins in 30 trades which equals a 70% win rate.
I checked my IG demo account and I have been paid £20.55 in interest over the test for the EURUSD and I have no other EURUSD strategies so this is all PacMan interest. I cannot allocate this exactly to each strategy (I could but it is a lot of work) so I counted the number of trades in each strategy that would have been on the market at the 2200 time when interest is paid. Balmora74’s version was on the market overnight 12 times and my v2 21 times. So if we allocate 63.6% of the positive fees to v2 and 36.4% to Balmora74’s version then v2 gets a gain of +£13.07 and Balmora74 version +£7.48.
So overall the Balmora74 version made a loss of -£4.32 and my v2 a gain of +£151.67.
Sorry Balmora74 but I think your version is a little over optimized and with a stop loss that is too tight but to be honest neither of them is exciting me enough to rush to put them live yet. The good news I guess is that your’s has basically broken even and mine has made a small profit so at least we haven’t lost any money!
-
AuthorPosts