Pathfinder Trading System
Forums › ProRealTime English forum › ProOrder support › Pathfinder Trading System
- This topic has 1,834 replies, 139 voices, and was last updated 1 year ago by CFD AutoTrading.
Tagged: Pathfinder
-
-
12/29/2016 at 10:56 AM #19331
Hi,
May be it is a stupid question but let me ask anyway. I have tested your code for DAX-1 euro contract and even for DAX-5 euro and DAX-25 euoro. Number of trades, winratio and performance (shape of equity curve) differs really. How it can be so for the same period? My first feeling was it had been a curve fitting just for DAX-1 euro but I might be wrong.
Regards,
/Hakan
12/29/2016 at 11:28 AM #19338Hi Reiner,
I have tested DOW daily V2 and it seems good but I would like to ask a question about performance criterias. Personally I do allways comparare the system with “buy&hold” outcome. In this case buy&hold should give allmost +1900% in DOW daily where the system generates +455% since 1977 (this comparison can be done for each and every year as well to see performance distribution instead of overall comparison but I did not study in deep for moment). According to the overall comparison system is not so good, am I right or what am I missing?
Regards,
/Hakan
12/29/2016 at 4:40 PM #19368Considering the gains, in absolute, since 1979, is not very signifiactive, especially for the ancient years: you can see that in 1979 the Dow level was under 2000, instead of near 20 000 today: the variations were not the same as today, a variation of 1% has 10x more impact today; but the system is the same in the backtest, and that is why the equity curve has this hyperbolic form, but in fact the profit factor may be quite similar.
12/29/2016 at 8:26 PM #19384Hi Hakan76,
If I understand you right you expect the same backtest results when you are trading with the same account size (10k in your examples) a DAX 1 Euro-, 5 Euro- or 25 Euro contract.
I think your expectation is wrong. You have to synchronize at least account size and all position sizes with the contract value. I’m also not sure if all contract sizes have the same quotes.
Pathfinder DAX 4H is of course optimized for a 1 DAX mini contract but curve fitted – I hope not.
Best, Reiner
1 user thanked author for this post.
12/29/2016 at 8:42 PM #19387Hej Hakan,
I think Aloysius gave a good answer to your question. I mainly developed the Pathfinder daily versions for the purpose to find out the best saisonal adjustments. I think it’s more realistic to tweak the backtest for a slightly shorter history for instance the last 15-20 years. Maybe I can encourage you to improve the backtests.
Best, Reiner
1 user thanked author for this post.
12/29/2016 at 8:57 PM #19389Hi Reiner,
Read in the prevoius posts that Pathfinder also works on Bund Market, but i can’t find the corresponding code;
May I ask you to post the code ?
Thank you very much for the attention.
Best whishes for a wonderful 2017, Andrea
12/29/2016 at 9:28 PM #1939112/30/2016 at 11:33 AM #19410Hi Guys,
I have heng seng running on demo. It opened a position (2) on dec 28. Today it opened another position (2). Already up for around 140 pips. Heng Seng profits are amazing but it has still a high drawdown. It would be great if we could optimize the settings to get a lower drawdown. Probably a great index to add in your portfolio.
My maximum drawdown with heng seng is around €4000. I’m not able to get a lower drawdown. Maybe its a good idea if we make a V6 version for Hang Seng.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246// Pathfinder Trading System based on ProRealTime 10.2// Breakout system triggered by previous daily, weekly and monthly high/low crossings with smart position management// Version 5 Beta 3// Instrument: Hang Seng mini 4H, 2:15-16:00 CET, 10 points spread, account size 100.000 HKD// ProOrder code parameterDEFPARAM CUMULATEORDERS = true // cumulate orders if not turned offDEFPARAM PRELOADBARS = 10000// define intraday trading windowONCE startTime = 22500ONCE endTime = 170000// define instrument signalline with help of multiple smoothed averagesONCE periodFirstMA = 5ONCE periodSecondMA = 10ONCE periodThirdMA = 8// define filter parameterONCE periodLongMA = 380ONCE periodShortMA = 25// define position and money management parameterONCE positionSize = 1Capital = 10000Risk = 5 // in %equity = Capital + StrategyProfitmaxRisk = round(equity * Risk / 100)ONCE stopLossLong = 3.25 // in %ONCE stopLossShort = 2 // in %ONCE takeProfitLong = 2.25 // in %ONCE takeProfitShort = 2.25 // in %maxPositionSizeLong = MAX(6, abs(round(maxRisk / (close * stopLossLong / 100) / PointValue) * pipsize))maxPositionSizeShort = MAX(6, abs(round(maxRisk / (close * stopLossShort / 100) / PointValue) * pipsize))ONCE trailingStartLong = 1.75 // in %ONCE trailingStartShort = 1 // in %ONCE trailingStepLong = 0.2 // in %ONCE trailingStepShort = 0.2 // in %ONCE maxCandlesLongWithProfit = 20 // take long profit latest after 20 candlesONCE maxCandlesShortWithProfit = 13 // take short profit latest after 13 candlesONCE maxCandlesLongWithoutProfit = 25 // limit long loss latest after 25 candlesONCE maxCandlesShortWithoutProfit = 6 // limit short loss latest after 6 candles// define saisonal position multiplier >0 - long / <0 - short / 0 no tradeONCE January = 1ONCE February = 1ONCE March = 1ONCE April = 3ONCE May = 1ONCE June = 1ONCE July = 3ONCE August = -1ONCE September = -2ONCE October = 1ONCE November = 3ONCE December = 2// calculate daily high/low (include sunday values if available)dailyHigh = DHigh(1)dailyLow = DLow(1)// calculate weekly high/lowIf DayOfWeek < DayOfWeek[1] thenweeklyHigh = Highest[BarIndex - lastWeekBarIndex](dailyHigh)lastWeekBarIndex = BarIndexENDIF// calculate monthly high/lowIf Month <> Month[1] thenmonthlyHigh = Highest[BarIndex - lastMonthBarIndex](dailyHigh)monthlyLow = Lowest[BarIndex - lastMonthBarIndex](dailyLow)lastMonthBarIndex = BarIndexENDIF// calculate instrument signalline with multiple smoothed averagesfirstMA = WilderAverage[periodFirstMA](close)secondMA = TimeSeriesAverage[periodSecondMA](firstMA)signalline = TimeSeriesAverage[periodThirdMA](secondMA)// save position before trading window is openIf Time < startTime thenstartPositionLong = COUNTOFLONGSHARESstartPositionShort = COUNTOFSHORTSHARESEndIF// trade only in defined trading windowIF Time >= startTime AND Time <= endTime THEN// set saisonal patternIF CurrentMonth = 1 THENsaisonalPatternMultiplier = JanuaryELSIF CurrentMonth = 2 THENsaisonalPatternMultiplier = FebruaryELSIF CurrentMonth = 3 THENsaisonalPatternMultiplier = MarchELSIF CurrentMonth = 4 THENsaisonalPatternMultiplier = AprilELSIF CurrentMonth = 5 THENsaisonalPatternMultiplier = MayELSIF CurrentMonth = 6 THENsaisonalPatternMultiplier = JuneELSIF CurrentMonth = 7 THENsaisonalPatternMultiplier = JulyELSIF CurrentMonth = 8 THENsaisonalPatternMultiplier = AugustELSIF CurrentMonth = 9 THENsaisonalPatternMultiplier = SeptemberELSIF CurrentMonth = 10 THENsaisonalPatternMultiplier = OctoberELSIF CurrentMonth = 11 THENsaisonalPatternMultiplier = NovemberELSIF CurrentMonth = 12 THENsaisonalPatternMultiplier = DecemberENDIF// define trading filters// 1. use fast and slow averages as filter because not every breakout is profitablef1 = close > Average[periodLongMA](close)f2 = close < Average[periodLongMA](close)f3 = close > Average[periodShortMA](close)f4 = signalline < Average[periodshortMA](close)// 2. check if position already reduced in trading window as additonal filter criteriaalreadyReducedLongPosition = COUNTOFLONGSHARES < startPositionLongalreadyReducedShortPosition = COUNTOFSHORTSHARES < startPositionShort// long position conditionsl1 = signalline CROSSES OVER monthlyHighl2 = signalline CROSSES OVER weeklyHighl3 = signalline CROSSES OVER dailyHighl4 = signalline CROSSES OVER monthlyLow// short position conditionss1 = signalline CROSSES UNDER monthlyHighs4 = signalline CROSSES UNDER dailyHighs5 = signalline CROSSES UNDER dailyLow// long entry with order cumulationIF ( (l1 OR l4 OR l2 OR (l3 AND f2) ) AND NOT alreadyReducedLongPosition) THEN// check saisonal booster setup and max position sizeIF saisonalPatternMultiplier > 0 THENIF (COUNTOFPOSITION + (positionSize * saisonalPatternMultiplier)) <= maxPositionSizeLong THENBUY positionSize * saisonalPatternMultiplier CONTRACT AT MARKETENDIFELSIF saisonalPatternMultiplier <> 0 THENIF (COUNTOFPOSITION + positionSize) <= maxPositionSizeLong THENBUY positionSize CONTRACT AT MARKETENDIFENDIFstopLoss = stopLossLongtakeProfit = takeProfitLongENDIF// short entry with order cumulationIF ((s1 AND f3) OR (s5 AND f1) OR (f4 AND (s4 AND f2)) ) AND NOT alreadyReducedShortPosition THEN// check saisonal booster setup and max position sizeIF saisonalPatternMultiplier < 0 THENIF (COUNTOFPOSITION + (positionSize * ABS(saisonalPatternMultiplier))) <= maxPositionSizeShort THENSELLSHORT positionSize * ABS(saisonalPatternMultiplier) CONTRACT AT MARKETENDIFELSIF saisonalPatternMultiplier <> 0 THENIF (COUNTOFPOSITION + positionSize) <= maxPositionSizeLong THENSELLSHORT positionSize CONTRACT AT MARKETENDIFENDIFstopLoss = stopLossShorttakeProfit = takeProfitShortENDIF// stop and profit managementIF LONGONMARKET THENposProfit = (((close - positionprice) * pointvalue) * countofposition) / pipsizeELSIF SHORTONMARKET THENposProfit = (((positionprice - close) * pointvalue) * countofposition) / pipsizeENDIFm1 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithProfitm2 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithProfitm3 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithoutProfitm4 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithoutProfit// take profit after max candlesIF LONGONMARKET AND (m1 OR m3) THENSELL AT MARKETENDIFIF SHORTONMARKET AND (m2 OR m4) THENEXITSHORT AT MARKETENDIF// trailing stop functiontrailingStartLongInPoints = tradeprice(1) * trailingStartLong / 100trailingStartShortInPoints = tradeprice(1) * trailingStartShort / 100trailingStepLongInPoints = tradeprice(1) * trailingStepLong / 100trailingStepShortInPoints = tradeprice(1) * trailingStepShort / 100// reset the stoploss valueIF NOT ONMARKET THENnewSL = 0ENDIF// manage long positionsIF LONGONMARKET THEN// first move (breakeven)IF newSL = 0 AND close - tradeprice(1) >= trailingStartLongInPoints * pipsize THENnewSL = tradeprice(1) + trailingStepLongInPoints * pipsizeENDIF// next movesIF newSL > 0 AND close - newSL >= trailingStepLongInPoints * pipsize THENnewSL = newSL + trailingStepLongInPoints * pipsizeENDIFENDIF// manage short positionsIF SHORTONMARKET THEN// first move (breakeven)IF newSL = 0 AND tradeprice(1) - close >= trailingStartShortInPoints * pipsize THENnewSL = tradeprice(1) - trailingStepShortInPoints * pipsizeENDIF// next movesIF newSL > 0 AND newSL - close >= trailingStepShortInPoints * pipsize THENnewSL = newSL - trailingStepShortInPoints * pipsizeENDIFENDIF// stop order to exit the positionsIF newSL > 0 THENSELL AT newSL STOPEXITSHORT AT newSL STOPENDIF// superordinate stop and take profitSET STOP %LOSS stopLossSET TARGET %PROFIT takeProfitENDIF1 user thanked author for this post.
12/30/2016 at 2:09 PM #1943312/30/2016 at 2:30 PM #1943912/30/2016 at 2:47 PM #1944112/31/2016 at 5:22 PM #19508Hallo
I tried to rebuild the SMI according to Reiners taste. More than 80% Profit and less than 25% Drawdown.
Milk the swiss cow.
All the best for 2017
MichiM
2 users thanked author for this post.
01/01/2017 at 5:10 PM #19574Hi guys,
With start 2017 I’m going to manage one of my ETF account with a bunch of Pathfinder daily swing robots and for this reason I have opened a new topic for the Pathfinder swing trading system idea here https://www.prorealcode.com/topic/pathfinder-swing-ts/
This topic remains for all general Pathfinder questions and especially for the “flagship” DAX 4H. All swing trade related questions please ask in the new topic.
Best, Reiner
1 user thanked author for this post.
01/03/2017 at 9:57 AM #19668Beest wishes for 2017.
It seems that DAX4HV6 opened a short yesterday at 13:00 hours @ 11.578,30 (according to BT) but was not pushed as a real trade in IG.
This is actually the first time this happened with V6. Former trades went well.
I don’t think i am the only one with this issue. Do you have any idea what went wrong?
Thanks.
Best regards,
Patrick
1 user thanked author for this post.
01/03/2017 at 10:17 AM #19672Hi,
I am not sure if it possible but I feel that it is a litte hard to find different versions of Pathfinder in the forum, anyone have a recommendation about how can I find them easly and recognize old ones versus new?
Regards.
/Hakan
-
AuthorPosts
Find exclusive trading pro-tools on