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
-
-
10/16/2017 at 12:12 PM #49546
As I could see from some comments (I have not read all 98 pages yet, maybe I did notsee “the” explanation for it), there seems to be a variation of positions / entries. Is there any forum for following / compareing / commenting the “real trades” of the pathfinder system? So I would not spam this forum…
“My” HS live closed short (1 position) & opened long (3 positions) @28705,1 / 13:oo pm (Germany, which is CEST).
10/17/2017 at 5:20 PM #49705Which HS version are you running?
10/17/2017 at 8:17 PM #49735@dajvop: Pathfinder HS 4H V7
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344Hauptcode : Pathfinder HS 4H V7//-------------------------------------------------------------------------// Pathfinder Trading System based on ProRealTime 10.3// Reiner @ www.prorealcode.com// Breakout system triggered by previous daily, weekly and monthly high/low crossings with smart position management// Version 7 - last optimization from 18.07.2017// Instrument: Hang Seng mini 4H, 5-17:00 CET, 10 points spread, account size 100.000 HKD// V7 release notes:// fix the preloadbars error// fix the maxPositionSizeShort error// fix the erroneous calculation of the short postion size// add dynamic position sizing based on weekly performance// add maximum size per trade monitoring// remove dynamic max position size calculation// optimize all relevant parameters// ProOrder code parameterDEFPARAM CUMULATEORDERS = true // cumulate orders if not turned offDEFPARAM PRELOADBARS = 10000// define intraday trading windowONCE startTime = 050000ONCE endTime = 170000// define instrument signalline with help of multiple smoothed averagesONCE periodFirstMA = 5ONCE periodSecondMA = 10ONCE periodThirdMA = 8// define filter parameterONCE periodLongMA = 200ONCE periodShortMA = 25// size calculation: size = positionSize * trendMultiplier * saisonalPatternMultiplierONCE positionSize = 1 // default start sizeONCE trendMultiplier = 2 // >1 with dynamic position sizing; 1 withoutONCE maxPositionSizePerTrade = 6 // maximum size per tradeONCE maxPositionSizeLong = 6 // maximu size for a long positionONCE maxPositionSizeShort = 6 // maximum size for a short positionONCE stopLossLong = 3 // in %ONCE stopLossShort = 1.5 // in %ONCE takeProfitLong = 2.25 // in %ONCE takeProfitShort = 2 // in %ONCE trailingStartLong = 2 // in %ONCE trailingStartShort = 1.5 // in %ONCE trailingStepLong = 0.2 // in %ONCE trailingStepShort = 0.2 // in %ONCE maxCandlesLongWithProfit = 19 // take long profit latest after x candlesONCE maxCandlesShortWithProfit = 10 //10 take short profit latest after x candlesONCE maxCandlesLongWithoutProfit = 25 // limit long loss latest after x candlesONCE maxCandlesShortWithoutProfit = 6 // limit short 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 = 0 //0 okONCE January2 = 0 //2 okONCE February1 = 3 //1 chanceONCE February2 = 0 //0 okONCE March1 = 1 //0 risk(1)ONCE March2 = 2 //1 chanceONCE April1 = 2 //0 risk(2)ONCE April2 = 2 //0 risk(2)ONCE May1 = 1 //0 risk(1)ONCE May2 = 2 //0 risk(2)ONCE June1 = 0 //0 okONCE June2 = 0 //1 okONCE July1 = 2 //0 risk(3)ONCE July2 = 1 //1 okONCE August1 = 1 //0 chanceONCE August2 = 0 //1 okONCE September1 = 0 //0 okONCE September2 = 0 //0 okONCE October1 = 3 //3 okONCE October2 = 3 // 0 risk(3)ONCE November1 = 1 //1 okONCE November2 = 2 //0 risk(2)ONCE December1 = 0 //0 okONCE December2 = 1 //1 chance// 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/low//If Month[1] <> Month[2] thenIf 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)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 THENnumberContracts = MIN(maxPositionSizePerTrade, positionSize * saisonalPatternMultiplier)IF (COUNTOFPOSITION + numberContracts) <= maxPositionSizeLong THENBUY numberContracts CONTRACT AT MARKETENDIFELSIF saisonalPatternMultiplier <> 0 THENnumberContracts = MIN(maxPositionSizePerTrade, positionSize)IF (COUNTOFPOSITION + numberContracts) <= maxPositionSizeLong THENBUY numberContracts 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 THENnumberContracts = MIN(maxPositionSizePerTrade, positionSize * ABS(saisonalPatternMultiplier))IF (ABS(COUNTOFPOSITION) + numberContracts) <= maxPositionSizeShort THENSELLSHORT numberContracts CONTRACT AT MARKETENDIFELSIF saisonalPatternMultiplier <> 0 THENnumberContracts = MIN(maxPositionSizePerTrade, positionSize)IF (ABS(COUNTOFPOSITION) + numberContracts) <= maxPositionSizeShort THENSELLSHORT numberContracts CONTRACT AT MARKETENDIFENDIFstopLoss = stopLossShorttakeProfit = takeProfitShortENDIF// stop and profit managementIF LONGONMARKET THENposProfit = (((close - positionprice) * pointvalue) * countofposition) / pipsizeELSIF SHORTONMARKET THENposProfit = (((positionprice - close) * pointvalue) * countofposition) / pipsizeENDIFnumberCandles = (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 = stopLossLongtakeProfit = takeProfitLongENDIF// 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 takeProfitENDIF10/17/2017 at 9:20 PM #49739Same version that I am running.
I had the 2 short position close and 6 open long yesterday at 1 pm. Have you changed anything if only 1 short closed and 3 long opened?
10/17/2017 at 9:57 PM #49746@dajvop: Nope. That is what I meant with #49546. Maybe because the Account is my “regular” trading Account and the free money is <10k?
10/18/2017 at 6:43 AM #4976110/18/2017 at 5:18 PM #49858Hi guys
@guitarroker
have you used this strat for a long time ?
oI had the same issue before, I think it is due to :
IF DayOfWeek <> DayOfWeek[1] and DayOfWeek = 1 THENIF strategyProfit > profitLastWeek + 1 THENpositionSize = min(trendMultiplier, positionSize + 1) // increase riskELSEpositionSize = max(1, positionSize – 1) // decrease riskENDIFprofitLastWeek = strategyProfitENDIFyou cannot benefit from the increase risk option because of a lack of strategyprofit10/19/2017 at 4:25 PM #49977@reb: I think you are right. I tried it only on demo. Seems to be the point. Thank you!
10/23/2017 at 8:25 AM #50275Should have waited one more week 😉 HS long (3) closed and HS short (2) opened at 28283.4 (5 o’clock).
DOW long (3) opened at 23345,1 (9 o ‘clock)
10/24/2017 at 8:26 AM #50355-
HS short closed @28101.2 (9 am) no new position opened.
Dow long still active.
10/26/2017 at 12:58 PM #50603HS 6 Long @28177,9 (yesterday 17h)
Dow 3 Long closed @23349,2 (today 9h)10/26/2017 at 4:23 PM #50629hey guys. great work.
one question: I run all the backtests, on everyone 2017 is not really good. Is it like this or do I make a mistake?
10/29/2017 at 7:50 PM #50848@raphaelopilski: If you ask for a comparison backtest / realdepot, I cannot answer. I, myself am running “live” only for days…
10/30/2017 at 7:54 AM #50872yes, I made a backtest. 4 hours and 100.000 units. everything looks good, but 2017 is quite bad.
How do you run it? Only for days? How does it work?
11/05/2017 at 7:47 PM #51576@raphaelopilski: Not fully sure, what you mesn. EVERY strategy hss bad & good periods. It is important that in the long run the figures are green.
I run it some 2 & 1/2 weeks now. Some are negative (HS), some positive (Dow). But as Statistics is an asshole, the number of incidents (N) is too little in my case to give a qualified answer.
-
AuthorPosts
Find exclusive trading pro-tools on