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
-
-
03/29/2018 at 2:25 PM #66697
Writing codes and testing them is a very good educational tool
I agree, a good point well made (as usual) but I do think that newbie (or not so newbie coders can get sucked in by the optimiser and it can take a long long time coding, backtesting, demo running to understand the clear signs of curve fitting. Maybe the Topic Aloysius proposed might shorten the learning curve.
I’ll put my hand up and say the Optimiser sucked me in for long enough … and I understood about curve fitting and the signs … hell it still sucks me in especially after many hours coding! I think because I want to see results / some £££s for my time and so I launch a System (sometimes even in Live) and then wish I never had! 🙂
Hey we should start new Threads on these interesting Topics under Trading Discussions?? It would mean we don’t hijack Threads on the coding Support Forum? Apologies readers!
1 user thanked author for this post.
03/29/2018 at 2:32 PM #66699I think the main problem of most of the strategies here is that they are optimized over the whole available data. One must understand that this is just producing fantasy results. Either WFA or at least an OOS test is absolutely mandatory for having a result that is somehow useful. I pointed out so several times to Reiner but he always replied that he had no time to do so.
BTW I agree that we should start a new thread. This discussion is not really a pathfinder discussion anymore.
03/29/2018 at 2:43 PM #66700and so I launch a System (sometimes even in Live) and then wish I never had!
I never put a strategy live straight away – I need to build confidence in it first. I am very very cautious about putting any code live (at the moment I have exactly zero codes running live while I wait for the markets to sort themselves out and get rid of all the noise we currently have).
I am actually very happy if a strategy fails in demo. First of all I have lost no money (half the battle is won) and secondly I can re-analyse the strategy and work out why it went wrong – which is a free lesson in how not to do it.
03/29/2018 at 4:54 PM #6671204/03/2018 at 11:12 PM #6707804/04/2018 at 12:13 PM #6713204/08/2018 at 10:06 PM #67565Pls, can you put the code in here or give as attachment?
Sure, at the beginning i was jelous of it, but in this forum i found so much help and new idea that i want to share mine too!
I hope we can work on it ad see if these could help us!
FILTERS123456789101112131415161718192021222324252627////FILTRI longONCE LL = -160ONCE SS = 26//once mioL = var//filtri shortonce AA = -140ONCE BB = 55mac= MACDline[12,26,9](close)ONCE P = 5ONCE COEFF = 0.7///codici filtriREM Calcolo della Media MobileMME3 = ExponentialAverage[P](ExponentialAverage[P](ExponentialAverage[P](close)))MME4 = ExponentialAverage[P](MME3)MME5 = ExponentialAverage[P](MME4)MME6 = ExponentialAverage[P](MME5)REM Calcolo dei coefficientiONCE c1 = SQUARE(coeff)*coeffONCE c1 = -c1ONCE c2 = 3*SQUARE(coeff)-3*c1ONCE c3 = -2*c2 -3*c1 -3*coeffONCE c4 = 1 + 3*coeff + c2 +2*c1Tilson = c1*MME6 + c2*MME5 + c3*MME4 + c4*MME3////////////c02=R2[50](Tilson)-r2[50](average[50])filtrolong= (mac > LL) and (mac < SS) and (c02 < 0.03)and (c02>-0.49)//and c1//AND ff2 and c1 //AND ff3filtroshort= (mac > AA) and (mac < BB) //and c2// and ss1 and c2// AND ss2order section need to be changed in
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061// 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 MARKETENDIFif filtrolong thenBUY numberContracts CONTRACT AT MARKETENDIFendifELSIF saisonalPatternMultiplier <> 0 THENnumberContracts = MAX(1, MIN(maxPositionSizePerTrade, positionSize) * scaleFactor)IF (COUNTOFPOSITION + numberContracts) <= maxPositionSizeLong * scaleFactor THENIF SHORTONMARKET THENEXITSHORT AT MARKETENDIFif filtrolong thenBUY numberContracts CONTRACT AT MARKETENDIFENDIFENDIFstopLoss = 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 MARKETENDIFIF filtroshort THENSELLSHORT numberContracts CONTRACT AT MARKETENDIFENDIFELSIF saisonalPatternMultiplier <> 0 THENnumberContracts = MAX(1, MIN(maxPositionSizePerTrade, positionSize) * scaleFactor)IF (ABS(COUNTOFPOSITION) + numberContracts) <= maxPositionSizeShort * scaleFactor THENIF LONGONMARKET THENSELL AT MARKETENDIFIF filtroshort THENSELLSHORT numberContracts CONTRACT AT MARKETENDIFENDIFENDIFstopLoss = stopLossShorttakeProfit = takeProfitShortENDIF
@reiner what do you think?04/09/2018 at 6:30 AM #6757604/09/2018 at 8:58 AM #67582Would be great if there could be a ‘switch’ that makes max numbercontracts = 1 or 2 or 4 or user choice?
Reason is I always Backtest at Lot Size = 1 and so to compare with other Systems I need Lot size = 1.
I have made changes as below in 4 places and still it is sellingshort at more than 1 on some trades.
Also if I make changes as below then I have to remember where I made the changes if I want it back again as original 🙂
1numberContracts = 1 or MAX(1, MIN(maxPositionSizePerTrade, positionSize) * scaleFactor)04/09/2018 at 9:27 AM #67587@Gianluca, be careful because your code cause positions of 60 lots when winning in the backtest, but in real life it could be very dangerous. Filtering past bad trades does not mean that it will filter future bad ones. It would be wise to watch in demo before live trading.
04/09/2018 at 9:33 AM #67589@gianluca, be careful because your code cause positions of 60 lots when winning in the backtest, but in real life it could be very dangerous. Filtering past bad trades does not mean that it will filter future bad ones. It would be wise to watch in demo before live trading.
I know, but if you can see the 60 lots are after thousand and thousand of gain. In fact the basic size is 1, and the increase is not so fast.
Of course the risk could be changed upon the own risk.
Of course it doesn’t mean that in future will not be bad trades, but we are trying to find a statistics advantage, and we can find it only working on the past.
04/09/2018 at 9:51 AM #67590Yes so if i look at the curve of the backtest, the first time it takes 60 lots (june 27, 2013), the system has won 23000€ : but if the market had unfortunatly fallen for 350 points (which is not exceptional), all the gains were gone. But if this had happen, when backtesting now, optimization would have found other filter variable to avoid this bad trade.
04/09/2018 at 11:17 AM #67683Yes so if i look at the curve of the backtest, the first time it takes 60 lots (june 27, 2013), the system has won 23000€ : but if the market had unfortunatly fallen for 350 points (which is not exceptional), all the gains were gone. But if this had happen, when backtesting now, optimization would have found other filter variable to avoid this bad trade.
The first big position is on march 28 2012 and was 14 size, in that date the system had also a gain of 3000€ maybe yes is too much, and in a real account is better to put less risk on, i am using it on DEMO, and there there’s no problem with size 😀
04/12/2018 at 3:31 PM #6818104/12/2018 at 7:39 PM #68209Demo-Mode took yesterday a short postion at 12.284 SL 12.683 TP 11.946
We shall see! 😀
-
AuthorPosts
Find exclusive trading pro-tools on