Pathfinder swing TS
03/14/2017 at 7:29 PM #28560
I’ve just opened a manual Long trade on Chicago Wheat because I think the market structure is right for an UP period.
I thought I’d check on ‘wheat seasonality’ and I see that July is a good month historically … see attached.
I then looked at the matrix on Page 1 for wheat seasonality and I note wheat gets a ‘0’ in July … see attached.
Am I reading something wrong or anybody got any thoughts please?
GraHal03/15/2017 at 4:08 AM #2857203/15/2017 at 4:11 AM #2857303/15/2017 at 10:32 AM #2860403/15/2017 at 11:07 AM #28610
@dajvop thank you
Your chart is 20 years to 2009 and my chart is 20 years to 2014. You wouldn’t think there be so much change in overall 12 month profile in 5 years?
But there is also attached on equityclock.com shows latest on Seasonality … in their words
Identified below are the periods of seasonal strength for each market segment. Each bar will indicate a buy and sell date based upon the optimal holding period for each market sector/index.
PS How did you embed that chart in your post? I don’t appear to have that option (tried copy & paste and ctrl v etc)03/15/2017 at 12:43 PM #28631
The page looks useful but unfortunately it is not solving the problem because the structure of the two codes are very different.
Attached again for a like for like comparison, the individual month of Feb1 and the full year algo, which only trades in the first half of February.
Would be nice if somebody could have a look because I think it would be very beneficial to use only a full year algo at the end of the day. (If we once finish the full year for all indices and commodities)
Oliver03/15/2017 at 1:17 PM #28636
Ah yeah I see what you mean O-jay8 … there’s ‘too much difference’ for the Code Diff checker to be useful.
Surely the Feb only version has to be better as there’s loads less Drawdown?? I’d be more comfortable with the Feb1 version … or am I missing something?
See attached for comparison since 2 Jan 1976
GraHal03/15/2017 at 3:03 PM #28653
Ignore 2 screen shots above showing zero drawdown (I didn’t wait for the PRT server to compute the figure).
2 on the right do show DD.
Attached are the curves for Feb1 and FY … very similar, but with 2 more trades in the FY system.
So what conclusion do we draw O-jay8 ?
GraHal03/15/2017 at 3:27 PM #28658
As you can see in my screenshot, highlighted with a red line, the FY V1 has 3 trades which do not occur for the Feb1.
And the Feb1 has one trade which does not occur in the FY V1.
The question is why, because in my opinion the results of the code should be the same. Only the structure is different.
Until we sort this out, I would of course rather trade the individual month of Feb1.
As it was the approach of Pfeiler with the full year algo, I would like to hear his opinion on this matter as well.
@ GraHal, another question, as I do spread betting as well, what do you use for corn and chicago wheat, DFB?
Oliver03/15/2017 at 3:45 PM #28660
@ojay: All I can offer right now is this link with an updated FY algo:
Please have a look at the calculation of ‘midofmonth’. The prt variable ‘Days’ does not count to the end of the month, so in this version it is calculated again (still not perfect but better, as you can see with the prt graph function
Hope this helps.03/15/2017 at 3:52 PM #28666
@ O-jay8 you’d need to isolate the 3 trades that are different and then examine the triggers and check out what is going on?
Use the GRAPH Function to isolate triggers … see attached.
Corn (DFB) Code C and Chicago Wheat(DFB) Code W … is that what you mean?
GraHal03/16/2017 at 1:34 AM #28726
I have noted the following differences that does not appear in the other version:
FY: 2000-03-01, 2006-03-01, 2010-02-02
Even though March1 is set to 0, there are 2 trades in that period for the FY version.
The differences in drawdown comes from the 2010-02-02 trade which was a loss.03/16/2017 at 7:38 AM #2873403/16/2017 at 9:06 AM #2873603/16/2017 at 8:35 PM #28805123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197// Pathfinder Trading System based on ProRealTime 10.2// Breakout system triggered by previous daily high/low crossings with smart position management// Version 2 - long only// Instrument: GOLD mini 1D, 0.3 points spread, account size 10.000 Euro// Rating c// ProOrder code parameterDEFPARAM CUMULATEORDERS = true // cumulate orders if not turned offDEFPARAM PRELOADBARS = 10000// define instrument signalline with help of multiple smoothed averagesONCE periodFirstMA = 5ONCE periodSecondMA = 10ONCE periodThirdMA = 6// x1 //nr 1 (between 1 -10)// define filter parameterONCE periodLongMA = 10//x2 //nr 2 (check values beetween 10 -100)// define position and money management parameterCapital = 10000Risk = 5 // in %equity = Capital + StrategyProfitmaxRisk = round(equity * Risk / 100)x= 1PositionSize = xONCE stopLossLong = 5 //x1 nr 3 (between 5-10) in %ONCE takeProfitLong = 5.25 //x2 nr 4 (between 3-10) in %maxPositionSizeLong = MAX(15, abs(round(maxRisk / (close * stopLossLong / 100) / PointValue) * pipsize))ONCE maxCandlesLongWithProfit = 11 //x1 nr 5 (between 5 - 15) take long profit latest after x candlesONCE maxCandlesLongWithoutProfit = 14 //x2 nr 6 (between 5 - 15) limit long loss latest after x candles// define saisonal position multiplier for each month 1-15 / 16-31 (>0 - long / <0 - short / 0 no trade)ONCE January1 = 0ONCE January2 = 0ONCE February1 = 0ONCE February2 = 0ONCE March1 = 3ONCE March2 = 0ONCE April1 = 0ONCE April2 = 0ONCE May1 = 0ONCE May2 = 0ONCE June1 = 0ONCE June2 = 0ONCE July1 = 0ONCE July2 = 0ONCE August1 = 0ONCE August2 = 0ONCE September1 = 0ONCE September2 = 0ONCE October1 = 0ONCE October2 = 0ONCE November1 = 0ONCE November2 = 0ONCE December1 = 0ONCE December2 = 0// calculate daily high/low (include sunday values if available)dailyHigh = DHigh(1)dailyLow = DLow(1)// calculate instrument signalline with multiple smoothed averagesfirstMA = WilderAverage[periodFirstMA](close)secondMA = TimeSeriesAverage[periodSecondMA](firstMA)signalline = TimeSeriesAverage[periodThirdMA](secondMA)// set saisonal multipliercurrentDayOfTheMonth = Date - ((CurrentYear * 10000) + CurrentMonth * 100)midOfMonth = 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// use fast and slow averages as filter because not every breakout is profitablef1 = close > Average[periodLongMA](close)f2 = close < Average[periodLongMA](close)// long position conditionsl = signalline CROSSES OVER dailyHigh// short position conditionss = signalline CROSSES UNDER dailyLow// long entry with order cumulationIF (l AND f2) 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 means close long positionIF (s AND f1) THENSELL AT MARKETENDIF// stop and profit managementposProfit = (((close - positionprice) * pointvalue) * countofposition) / pipsizenumberCandles = (BarIndex - TradeIndex)m1 = posProfit > 0 AND numberCandles >= maxCandlesLongWithProfitm2 = posProfit < 0 AND numberCandles >= maxCandlesLongWithoutProfit// take profit after max candlesIF LONGONMARKET AND (m1 OR m2) THENSELL AT MARKETENDIF// superordinate stop and take profitSET STOP %LOSS stopLossSET TARGET %PROFIT takeProfit