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
-
-
02/25/2018 at 8:38 AM #63859
To trade the PF US500 in ProOrder you have to change line 51 to 5 and line 53/54/55 to 50. The minimum tradesize is 5 according to IG.
You get more or less the same outcome in the results as with the original sizes. Which is weird because if you take a look at the orderlist in the beginning of 2010
you see a couple of times orders with 2 positions only. The trades should have been rejected in live by the way.
And in this code the startrisk is 2. If you take less risk (<2) you probably have to change the minimumsize as well.
Regards,
02/25/2018 at 3:49 PM #63890Hello.
I’ve been following you here for a longer while. It’s very interesting and I can see how much work is already done in the Pathfinder trading systems.
Many thanks to all of you for this!I would like to share my results with you in demo mode.
Here attached.And I would like to ask you two three things too.
Is there anyone who runs the Pathfinder in the Dax live? If so, how long you do this and would you be willing to share the results?
What results have been obtained over the longest period of time tested with which system?
And last but not least.
Does anyone or can someone provide one of the Pathfinder systems as mt4. file? If not, do we want to pool money and hire a professional programming service?until then
JohnScherTranslated with http://www.DeepL.com/Translator
02/26/2018 at 6:38 PM #63997Pathfinder Silver looks a lot better if you can backtest with 200.000 candles. So I am running it as well.
I am now live with 13 PF-4H algos. Wow, I hope they perform like in the last 2 weeks. Not a big hit, but all the small profits summed up to a nice chunk of cash.
I actually also hope they will not trigger all at once, this could severly crush my margin.
I will definitly reduce the algos when I hit 50%.
@wp01: Thanks for the tip with the Us 500. I changed it accordingly and updated the dropbox.1 user thanked author for this post.
03/01/2018 at 1:23 PM #64183life/demo and backtest: backtest needs an additional candle before the data is synchronized again
From yesterday a position was opened on NIKKEI, but nothing on backtest. And there was more than 4h.
Is it normal?
03/03/2018 at 10:05 PM #6432203/03/2018 at 10:48 PM #64327life/demo and backtest: backtest needs an additional candle before the data is synchronized again
From yesterday a position was opened on NIKKEI, but nothing on backtest. And there was more than 4h. Is it normal?
Guys, i checked the TS on Nikkei, and it should not have open a trade on 26 of febr, but it did. And i lost 1.200$ for it, could someone help me? @reiner @nicolas
Nikkei code123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346// ProOrder code parameterDEFPARAM CUMULATEORDERS = true // cumulate orders if not turned offDEFPARAM PRELOADBARS = 10000// define intraday trading windowONCE startTime = 50000 // start time of trading window in CETONCE endTime = 210000 // end time of trading window in CET// define instrument signalline with help of multiple smoothed averagesONCE periodFirstMA = 5 // 5 is center of gravity, do not changeONCE periodSecondMA = 10 // 10 is center of gravity, do not changeONCE periodThirdMA = 3 // heartbeat of the instrument// define filter parameterONCE periodLongMA = 250 // period lenght of the long moving average that works as filterONCE periodShortMA = 10 // period lenght of the short moving average that works as filter// define money and position management parameter// dynamic scaling of the chance/risk profile depending on account sizeONCE startRisk = 0.25 // start risk level e.g 0.25 - 25%, 0.5 - 50%, 0.75 - 75%, 1 - 100% and so onONCE maxRisk = 1 // max risk level e.g 1.5 - 150%ONCE increaseRiskLevel = 300 // amount of profit from which the risk is to be increasedONCE increaseRiskStep = 0.25 // step by which the risk should be increased// size calculation: size = positionSize * trendMultiplier * saisonalPatternMultiplier * scaleFactorONCE positionSize = 1 // default start sizeONCE trendMultiplier = 3 // >1 with dynamic position sizing; 1 withoutONCE maxPositionSizePerTrade = 3 // maximum size per tradeONCE maxPositionSizeLong = 6 // maximum size for long positionsONCE maxPositionSizeShort = 1 // maximum size for short positionsONCE stopLossLong = 5 // in % *changed from 4.75ONCE stopLossShort = 1.5 // in % *changed from 3ONCE takeProfitLong = 3.5 // in % *changed from 3.25ONCE takeProfitShort = 1.75 // in %ONCE trailingStartLong = 1.25 // in %ONCE trailingStartShort = 0.5 // in %ONCE trailingStepLong = 0.8 // in %ONCE trailingStepShort = 0.3 // in %ONCE maxCandlesLongWithProfit = 13 // take long profit latest after x candles *changed from 12ONCE maxCandlesShortWithProfit = 10 // take short profit latest after x candlesONCE maxCandlesLongWithoutProfit = 35 // limit long loss latest after x candlesONCE maxCandlesShortWithoutProfit = 10 // limit short loss latest after x candles *changed from 25// define saisonal position multiplier for each month 1-15 / 16-31 (>0 - long / <0 - short / 0 no trade)ONCE January1 = 1 //0 *changed from 0ONCE January2 = 0 //0ONCE February1 = 0 //0ONCE February2 = 1.5 //2 *changed from 2ONCE March1 = 0 //0ONCE March2 = 0 //0ONCE April1 = 1.5 //2 *changed from 2ONCE April2 = 1.5 //2 *changed from 2ONCE May1 = 0 //0ONCE May2 = 1 //1ONCE June1 = 0 //0ONCE June2 = 1.5 //2 *changed from 2ONCE July1 = 1.5 //2 *changed from 2ONCE July2 = 0 //0ONCE August1 = 0 //0ONCE August2 = 0 //0ONCE September1 = 2 //2ONCE September2 = 0 //0ONCE October1 = 1.5 //2 *changed fromONCE October2 = 1.5 //1.5ONCE November1 = 1.5 //2 *changed from 2ONCE November2 = 1.5 //1.5ONCE December1 = 1.5 //2 *changed from 2ONCE December2 = 1.5 //2 *changed from 2// calculate the scaling factor based on the parameterscaleFactor = MIN(maxRisk, MAX(startRisk, ROUND(StrategyProfit / increaseRiskLevel) * increaseRiskStep))// dynamic position sizing based on weekly performanceONCE profitLastWeek = 0IF DayOfWeek <> DayOfWeek[1] AND DayOfWeek = 1 THENIF StrategyProfit > profitLastWeek + 1 THENpositionSize = MIN(trendMultiplier, positionSize + 1) // increase riskELSEpositionSize = MAX(1, positionSize - 1) // decrease riskENDIFprofitLastWeek = strategyProfitENDIF// calculate daily high/low (include sunday values if available)dailyHigh = DHigh(1)dailyLow = DLow(1)previousDailyHigh = DHigh(2)// calculate weekly high, weekly low is a poor signalIf DayOfWeek < DayOfWeek[1] AND lastweekbarindex = 0 THENlastWeekBarIndex = BarIndexELSEIF DayOfWeek < DayOfWeek[1] THENweeklyHigh = Highest[BarIndex - lastWeekBarIndex](dailyHigh)lastWeekBarIndex = BarIndexENDIFENDIF// calculate monthly high/lowIF Month <> Month[1] AND lastMonthBarIndex=0 THENlastMonthBarIndex=barindexELSIF 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 multipliercurrentDayOfTheMonth = OpenDaymidOfMonth = 15IF CurrentMonth = 1 THENIF currentDayOfTheMonth <= midOfMonth THENsaisonalPatternMultiplier = January1ELSEsaisonalPatternMultiplier = January2ENDIFELSIF CurrentMonth = 2 THENIF currentDayOfTheMonth <= midOfMonth THENsaisonalPatternMultiplier = February1ELSEsaisonalPatternMultiplier = February2ENDIFELSIF CurrentMonth = 3 THENIF currentDayOfTheMonth <= midOfMonth THENsaisonalPatternMultiplier = March1ELSEsaisonalPatternMultiplier = March2ENDIFELSIF CurrentMonth = 4 THENIF currentDayOfTheMonth <= midOfMonth THENsaisonalPatternMultiplier = April1ELSEsaisonalPatternMultiplier = April2ENDIFELSIF CurrentMonth = 5 THENIF currentDayOfTheMonth <= midOfMonth THENsaisonalPatternMultiplier = May1ELSEsaisonalPatternMultiplier = May2ENDIFELSIF CurrentMonth = 6 THENIF currentDayOfTheMonth <= midOfMonth THENsaisonalPatternMultiplier = June1ELSEsaisonalPatternMultiplier = June2ENDIFELSIF CurrentMonth = 7 THENIF currentDayOfTheMonth <= midOfMonth THENsaisonalPatternMultiplier = July1ELSEsaisonalPatternMultiplier = July2ENDIFELSIF CurrentMonth = 8 THENIF currentDayOfTheMonth <= midOfMonth THENsaisonalPatternMultiplier = August1ELSEsaisonalPatternMultiplier = August2ENDIFELSIF CurrentMonth = 9 THENIF currentDayOfTheMonth <= midOfMonth THENsaisonalPatternMultiplier = September1ELSEsaisonalPatternMultiplier = September2ENDIFELSIF CurrentMonth = 10 THENIF currentDayOfTheMonth <= midOfMonth THENsaisonalPatternMultiplier = October1ELSEsaisonalPatternMultiplier = October2ENDIFELSIF CurrentMonth = 11 THENIF currentDayOfTheMonth <= midOfMonth THENsaisonalPatternMultiplier = November1ELSEsaisonalPatternMultiplier = November2ENDIFELSIF CurrentMonth = 12 THENIF currentDayOfTheMonth <= midOfMonth THENsaisonalPatternMultiplier = December1ELSEsaisonalPatternMultiplier = December2ENDIFENDIF// 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 dailyLows3 = signalline CROSSES UNDER previousDailyHigh// 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 THENnumberContracts = MAX(1, MIN(maxPositionSizePerTrade, positionSize * saisonalPatternMultiplier) * scaleFactor)IF (COUNTOFPOSITION + numberContracts) <= maxPositionSizeLong * scaleFactor THENIF SHORTONMARKET THENEXITSHORT AT MARKETENDIFBUY numberContracts CONTRACT AT MARKETENDIFELSIF saisonalPatternMultiplier <> 0 THENnumberContracts = MAX(1, MIN(maxPositionSizePerTrade, positionSize) * scaleFactor)IF (COUNTOFPOSITION + numberContracts) <= maxPositionSizeLong * scaleFactor THENIF SHORTONMARKET THENEXITSHORT AT MARKETENDIFBUY numberContracts CONTRACT AT MARKETENDIFENDIFstopLoss = stopLossLongtakeProfit = takeProfitLongENDIF// short entry with order cumulationIF ( (s1 AND f3) OR (s2 AND f1) OR (s3 AND f3) ) AND NOT alreadyReducedShortPosition THEN// check saisonal booster setup and max position sizeIF saisonalPatternMultiplier < 0 THENnumberContracts = MAX(1, MIN(maxPositionSizePerTrade, positionSize * ABS(saisonalPatternMultiplier)) * scaleFactor)IF (ABS(COUNTOFPOSITION) + numberContracts) <= maxPositionSizeShort * scaleFactor THENIF LONGONMARKET THENSELL AT MARKETENDIFSELLSHORT numberContracts CONTRACT AT MARKETENDIFELSIF saisonalPatternMultiplier <> 0 THENnumberContracts = MAX(1, MIN(maxPositionSizePerTrade, positionSize) * scaleFactor)IF (ABS(COUNTOFPOSITION) + numberContracts) <= maxPositionSizeShort * scaleFactor THENIF LONGONMARKET THENSELL AT MARKETENDIFSELLSHORT numberContracts CONTRACT AT MARKETENDIFENDIFstopLoss = stopLossShorttakeProfit = takeProfitShortENDIF// stop and profit managementposProfit = (((close - positionprice) * pointvalue) * countofposition) / pipsizenumberCandles = (BarIndex - TradeIndex)m1 = posProfit > 0 AND numberCandles >= maxCandlesLongWithProfitm2 = posProfit > 0 AND numberCandles >= maxCandlesShortWithProfitm3 = posProfit < 0 AND numberCandles >= maxCandlesLongWithoutProfitm4 = posProfit < 0 AND numberCandles >= maxCandlesShortWithoutProfit// take profit after max candlesIF LONGONMARKET AND (m1 OR m3) THENSELL AT MARKETENDIFIF SHORTONMARKET AND (m2 OR m4) THENEXITSHORT AT MARKETENDIF// trailing stop function (convert % to pips)trailingStartLongInPoints = 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 * pipsizestopLoss = stopLossLong * 0.1takeProfit = takeProfitLong * 2ENDIF// 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 THENIF LONGONMARKET THENSELL AT newSL STOPENDIFIF SHORTONMARKET THENEXITSHORT AT newSL STOPENDIFENDIF// superordinate stop and take profitSET STOP %LOSS stopLossSET TARGET %PROFIT takeProfitENDIF03/03/2018 at 11:52 PM #64333I loaded PF Nikkei V6 to check the latest positions and V6 also opened a position on the same date and time. I see in your tradelog that the opening was from PF V7, but
have you checked that you also activated the correct version in ProOrder or that maybe an old version is hanging there? I’m asking because your BT also show two versions.
Dajvop and Pfeiler are also running PF Nikkei V7. Maybe they can tell you if they had the same positions.
Kind regards,
03/03/2018 at 11:58 PM #6433503/04/2018 at 12:16 AM #64336I already loaded your mac version and i get the same results as you have.
When did you activate it in ProOrder? There is a date on the right in ProOrder. I’m asking because i had some issues in the past when i activated a code in ProOrder while it is in position,
live and backtest were not always in sync. So if you activated it between 16-02-2018 09:00 hours and 26-02-2018 05:00 hours you were not have all the buys. I’m not sure if it goes well when the position
is closed. I can remember i had a few times a problem with that in the past. But this is easy to check for you. If it was before that date than this could not be the problem and i’m out of options.
03/04/2018 at 1:15 PM #6435603/05/2018 at 10:00 AM #64402I activated the latest NIKKEI v7 on Feb 6. The first buy was on Feb 16 0900, the second on Feb 19 0500 and the third on Feb 19 0900. Now, the backtest and live trading differs.
BT buys on Feb 21 0900 and then exits on Feb 26 0500.
LT exits all positions on Feb 21 1700, then buys on Feb 26 2100 and exits with loss on Mar 1 1946.
03/05/2018 at 10:34 AM #64407Thanks dajvop. The latest trade is the same as Gianluca reported after he activated it on the 20th. of february.
Do you have an idea why it bought on the 26th. at 09.00 and why it didn’t show up in the BT?
My idea is that it bought a position because of the dynamic positionsize. The algo had a profit in the week before.
IF DayOfWeek <> DayOfWeek[1] AND DayOfWeek = 1 THEN
IF StrategyProfit > profitLastWeek + 1 THEN
positionSize = MIN(trendMultiplier, positionSize + 1) // increase risk
ELSE
positionSize = MAX(1, positionSize – 1) // decrease risk
ENDIF
profitLastWeek = strategyProfiYou also had the full profit because you activated it earlier instead of Gianluca. He activated it the 20th. According to your tradelog from above he didn’t had one of the buy orders.
I think the reason why the results differ from the LT is that when you start the algo, it also starts with 1 position, depending on the risk you take. But when you look at the BT for over
5 or more years it had already increased multi positions and risk because of the positive results. Looking at the dynamic positionsize it increases the positionsize looking at results and
seasonal multiplier. (see line 47 and 48). When activated in LT it basicly starts at zero.
03/06/2018 at 10:18 AM #6455303/18/2018 at 2:09 PM #65571Buongiorno a tutti e un ringraziamento speciale a Reiner per la sua disponibilità, ha preso a disposizione il suo sistema pathfinder. Ho notato che quando uso pathfinder in modo reale le operazioni sono differenti da quelli eseguiti su backtest. Ho anche notato che, in modo reale, le operazioni dipendono dal momento in cui si avvia il sistema. La mia domanda è: qual è il momento giusto si deve lanciare il sistema? Qual è il momento giusto per le operazioni in modo reale coincidere con quelli in modo backtest? Grazie mille per l’eventuale risposta.
03/18/2018 at 2:17 PM #65572 -
AuthorPosts
Find exclusive trading pro-tools on