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
-
-
01/17/2017 at 3:22 PM #2147101/17/2017 at 3:59 PM #21475
Hi guys,
some of you asked me for a parameter setup for large account size (100k) for the Pathfinder DAX 4H V6.
I strictly recommend to start in life trading with a smaller account size such as 10k. The backtest looks very promising but the project status is still experimental and when you followed the topic discussions there are still some open points such as differences between backtest und life trading results.
In my opinion a good approach for a 100k account would be to trade the DAX mini 5Euro contract instead of DAX mini 1Euro. Enclosed is a version for an 100k account and DAX mini 5Euro. I can’t recommend to trade Pathfinder with a full DAX 25Euro future.
Best, Reiner
1 user thanked author for this post.
01/17/2017 at 4:00 PM #2147901/17/2017 at 5:09 PM #2148801/17/2017 at 6:55 PM #21494Hello REINER hello GUYS
Good news.. TRAILING STOP OF PATHFINDER WORKS WELL
I’m testing a modified version of pathfinder since 6.12.2016, I’ve call it Pathfinder DAX 4H V5B2_EASY. it is not the best like V6, so you can continue to use v6 version, but I want to tell you that this morning it had closed a short position by tailing stop!..
Please check the attached picture, and the code above to check the short position of january=1 and the triling stop of v6!!7 users thanked author for this post.
01/17/2017 at 7:43 PM #2150701/17/2017 at 10:29 PM #21516FTSE 4Hr (Long) closed today at 7238.7 for a loss.
FTSE 4Hr short opened shortly after at 7239.2 and currently running.
1 user thanked author for this post.
01/18/2017 at 12:39 PM #21551Hello
I have same trades in live account for FTSE (Long and then short)
But if I run the backtest, there is only the short one..The long (with the loss..) is not there..
01/18/2017 at 1:26 PM #21557I had a problem yesterday with FTSE v5b2 version.
It gave a lot of rejected orders. It gave an error -> The minimum order size was 2 for ftse. The orders where rejected at 17:00. System was automatically stopped.
So I thought the multiplier was 1 for this period. But when I looked back at the code it has 2 or >.
This was the code I was using.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247//-------------------------------------------------------------------------// Main code : Pathfinder FTSE 4H V5B2//-------------------------------------------------------------------------// 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 2// Instrument: FTSE mini 4H, 9-22 CET, 2 points spread, account size 10.000 Euro// ProOrder code parameterDEFPARAM CUMULATEORDERS = true // cumulate orders if not turned offDEFPARAM PRELOADBARS = 10000// define intraday trading windowONCE startTime = 90000ONCE endTime = 210000// define instrument signalline with help of multiple smoothed averagesONCE periodFirstMA = 5ONCE periodSecondMA = 10ONCE periodThirdMA = 7// define filter parameterONCE periodLongMA = 230ONCE periodShortMA = 10// define position and money management parameterONCE positionSize = 1Capital = 10000Risk = 5 // in %equity = Capital + StrategyProfitmaxRisk = round(equity * Risk / 100)ONCE stopLossLong = 4 // in %ONCE stopLossShort = 2.75 // in %ONCE takeProfitLong = 3 // in %ONCE takeProfitShort = 2 // in %maxPositionSizeLong = MAX(15, abs(round(maxRisk / (close * stopLossLong / 100) / PointValue) * pipsize))maxPositionSizeShort = MAX(5, abs(round(maxRisk / (close * stopLossShort / 100) / PointValue) * pipsize))ONCE trailingStartLong = 1.75 // in %ONCE trailingStartShort = 0.75 // in %ONCE trailingStepLong = 0.2 // in %ONCE trailingStepShort = 0.3 // in %ONCE maxCandlesLongWithProfit = 40 // take long profit latest after 40 candlesONCE maxCandlesShortWithProfit = 30 // take short profit latest after 30 candlesONCE maxCandlesLongWithoutProfit = 40 // limit long loss latest after 40 candles 30ONCE maxCandlesShortWithoutProfit = 9 // limit short loss latest after 9 candles// define saisonal position multiplier >0 - long / <0 - short / 0 no tradeONCE January = 3ONCE February = 3ONCE March = 2ONCE April = 2ONCE May = 2ONCE June = 2ONCE July = 2ONCE August = 3ONCE September = -2ONCE October = 2ONCE 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)// 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 monthlyHighs2 = 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 without order cumulationIF ( (s1 AND f3) OR (s2 AND f1) ) 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 takeProfitENDIFCould someone explain why it stopped?
Thanks,
Alco
01/18/2017 at 2:30 PM #2157501/18/2017 at 2:47 PM #2157701/18/2017 at 3:32 PM #21580@Alco.
I see in your screen at pending orders: 4. Are these related to the FTSE 100?
Because it looks like it had conflicting orders.
In this link from PRT you can read when it is automaticly stopped.
The minimum size is 1 for this contract, so that can not be the problem.
01/18/2017 at 3:52 PM #2158401/18/2017 at 4:01 PM #21590@Alco
The quickest way how i check what the minimum contractsize is i go in IG tradingplatform to that CFD, i click on it and create an order or ticket and than you see in under “grootte” (also Dutch :-))
the minimum contracts. I tried to find it on the website from IG, unfortunate without luck.
When you click all the FTSE 100 you see that they all show one contract. But i see your screen. So that’s weird……
01/18/2017 at 4:11 PM #21591 -
AuthorPosts
Find exclusive trading pro-tools on