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
-
-
11/07/2016 at 7:54 PM #1611011/08/2016 at 7:18 AM #16132
Hi nyborjare,
to work with pathfinder DAX strategy account value should be at least 8/9000 € in my opinionIn general to know account value to run strategies , you can multiply maxdrwadown of the strategy x 5 at least
For example :
MAXDRAWDOWN= € 1850 THEN
( € 1850 X 5) ACCOUNT VALUE = €9250
1 user thanked author for this post.
11/08/2016 at 7:39 AM #1613311/08/2016 at 12:59 PM #16159Does any one else still have problems with the program? or has experienced problems with another program an prorealtime?
I am using a version 3 code and there was a short position in the 3.11. that did not open and yesterday the long position opened at 17 o clock, not at 21:00 as the backtest shows.
all I changed in the code is that I split up the short and long conditions in order to define the stop and limit level induvidually ( or at least this is what I tried to do 😉 )
is it prorealtime or my code? I would be very thankful for some help.
Cheers
Flo
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214//-------------------------------------------------------------------------// Hauptcode : Pathfinder_v3_1//-------------------------------------------------------------------------//-------------------------------------------------------------------------// Hauptcode : Pathfinder_v3_1//-------------------------------------------------------------------------// Pathfinder DAX 4H, 9-22, 2 points spread// DAX breakout system triggered by previous daily, weekly and monthly high/low crossings// Version 3 with smart position sizing// ProOrder code parameterDEFPARAM CUMULATEORDERS = false // cumulate orders if not turned offDEFPARAM PRELOADBARS = 10000// trading window 8-22ONCE startTime = 80000ONCE endTime = 220000// smoothed average parameter (signalline)ONCE periodFirstMA = 5ONCE periodSecondMA = 10ONCE periodThirdMA = 3// filter parameterONCE periodLongMA = 250ONCE periodShortMA = 50// trading paramter// smart position sizingONCE PositionSize = 1// money and position management parameterONCE stoppLossL1 = 3 // in %ONCE stoppLossL2 = 4.75 // in %ONCE stoppLossL3 = 5.5 // in %ONCE stoppLossL4 = 4.25 // in %ONCE stoppLossS1 = 2.25 // in %ONCE stoppLossS2 = 2.5 // in %ONCE stoppLossS3 = 3.25 // in %ONCE takeProfitL1 = 5 // in %ONCE takeProfitL2 = 4.25 // in %ONCE takeProfitL3 = 6 // in %ONCE takeProfitL4 = 4.25 // in %ONCE takeProfitS1 = 2.5 // in %ONCE takeProfitS2 = 1.15 // in %ONCE takeProfitS3 = 3 // in %ONCE maxCandlesLongWithProfit = 18 // take long profit latest after 18 candlesONCE maxCandlesShortWithProfit = 15 // take short profit latest after 13 candlesONCE maxCandlesLongWithoutProfit = 30 // limit long loss latest after 30 candlesONCE maxCandlesShortWithoutProfit = 25 // limit short loss latest after 25 candlesONCE startShortPattern = 4 // AprilONCE endShortPattern = 9 // SeptemberONCE longPositionMultiplier = 1 // multiplier for long position size in case of higher saisonal probabilityONCE shortPositionMultiplier = 1 // multiplier for short position size in case of higher saisonal probability// calculate daily high/lowdailyHigh = 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 signalline with multiple smoothed averagesfirstMA = WilderAverage[periodFirstMA](close)secondMA = TimeSeriesAverage[periodSecondMA](firstMA)signalline = TimeSeriesAverage[periodThirdMA](secondMA)// trade only in trading window 8-22IF Time >= startTime AND Time <= endTime THEN// filter criteria because not every breakout is profitablec1 = close > Average[periodLongMA](close)c2 = close < Average[periodLongMA](close)c3 = close > Average[periodShortMA](close)c4 = close < Average[periodShortMA](close)// saisonal patternsaisonalShortPattern = CurrentMonth >= startShortPattern AND CurrentMonth <= endShortPattern// 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 monthlyLows3 = signalline CROSSES UNDER dailyLow// long entry monthly (L1)IF l1 THEN // cumulate orders for long tradesIF not saisonalShortPattern THENBUY PositionSize * longPositionMultiplier CONTRACT AT MARKETSET STOP %LOSS stoppLossL1SET TARGET %PROFIT takeProfitL1ELSEBUY PositionSize CONTRACT AT MARKETSET STOP %LOSS stoppLossL1SET TARGET %PROFIT takeProfitL1ENDIFENDIF// long entry weekly (L2)IF l2 THEN // cumulate orders for long tradesIF not saisonalShortPattern THENBUY PositionSize * longPositionMultiplier CONTRACT AT MARKETSET STOP %LOSS stoppLossL2SET TARGET %PROFIT takeProfitL2ELSEBUY PositionSize CONTRACT AT MARKETSET STOP %LOSS stoppLossL2SET TARGET %PROFIT takeProfitL2ENDIFENDIF// long entry dayly (L3)IF l3 AND c2 THEN // cumulate orders for long tradesIF not saisonalShortPattern THENBUY PositionSize * longPositionMultiplier CONTRACT AT MARKETSET STOP %LOSS stoppLossL3SET TARGET %PROFIT takeProfitL3ELSEBUY PositionSize CONTRACT AT MARKETSET STOP %LOSS stoppLossL3SET TARGET %PROFIT takeProfitL3ENDIFENDIF// long entry monthly low (L4)IF l4 THEN // cumulate orders for long tradesIF not saisonalShortPattern THENBUY PositionSize * longPositionMultiplier CONTRACT AT MARKETSET STOP %LOSS stoppLossL4SET TARGET %PROFIT takeProfitL4ELSEBUY PositionSize CONTRACT AT MARKETSET STOP %LOSS stoppLossL4SET TARGET %PROFIT takeProfitL4ENDIFENDIF// short entry (S1)IF NOT SHORTONMARKET AND s1 AND c3 THEN // no cumulation for short tradesIF saisonalShortPattern THENSELLSHORT positionSize * shortPositionMultiplier CONTRACT AT MARKETSET STOP %LOSS stoppLossS1SET TARGET %PROFIT takeProfitS1ELSESELLSHORT positionSize CONTRACT AT MARKETSET STOP %LOSS stoppLossS1SET TARGET %PROFIT takeProfitS1ENDIFENDIF// short entry (S2)IF NOT SHORTONMARKET AND s2 AND c4 THEN // no cumulation for short tradesIF saisonalShortPattern THENSELLSHORT positionSize * shortPositionMultiplier CONTRACT AT MARKETSET STOP %LOSS stoppLossS2SET TARGET %PROFIT takeProfitS2ELSESELLSHORT positionSize CONTRACT AT MARKETSET STOP %LOSS stoppLossS2SET TARGET %PROFIT takeProfitS2ENDIFENDIF// short entry (S3)IF NOT SHORTONMARKET AND s3 AND c1 THEN // no cumulation for short tradesIF saisonalShortPattern THENSELLSHORT positionSize * shortPositionMultiplier CONTRACT AT MARKETSET STOP %LOSS stoppLossS3SET TARGET %PROFIT takeProfitS3ELSESELLSHORT positionSize CONTRACT AT MARKETSET STOP %LOSS stoppLossS3SET TARGET %PROFIT takeProfitS3ENDIFENDIF// stop and profit managementposProfit = (((close - positionprice) * pointvalue) * countofposition) / pipsizem1 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithProfitm2 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithProfitm3 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithoutProfitm4 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithoutProfitIF LONGONMARKET AND (m1 OR m3) THENSELL AT MARKETENDIFIF SHORTONMARKET AND (m2 OR m4) THENEXITSHORT AT MARKETENDIFENDIF11/08/2016 at 1:27 PM #16161Dear Flo,
I have no problems with Pathfinder or PRT. It went long yesterday at 21.00 hrs. at the DAX in version 5. Depending on the amount of positions you have and if you did something with the change in the
saisonality i think you should now have 1 to 3 positions long. If this is not correct, maybe someone can complement this.
I think it is important to keep track with the latest version.
Several bugs have been solved by Reiner in the upcoming versions after version 3. I suggest you take the latest version and check the results with the backtest also here posted
and after that you can try to split the long and short conditions and see what is hapening.
regards,
Patrick
11/08/2016 at 2:06 PM #1616411/08/2016 at 2:19 PM #1616611/08/2016 at 2:45 PM #1616911/08/2016 at 2:52 PM #1617011/08/2016 at 2:56 PM #1617111/08/2016 at 3:09 PM #1617211/08/2016 at 3:25 PM #16179Did you made any adjustments for yourself in the code then?
Because the price didn’t come near the 10.340 between 13.00 and 21.00 hours.
Candle 1300 : open 10430 high 10443 low 10407 close 10441
Candle 1700: open 10441 high 10467 low 10436 close 10451
Candle 2100: open 10451 high 10480 low 10445 close 10462
I saw by the way in the order list that indead it took position at 17.00 hrs. at 10.442,50.
11/08/2016 at 4:07 PM #16182I double-checked. Real pathinder gave buy at 17.00 yesterday.
exact purchase price 10,441.8
The strange thing is that the same code in backtests and demos me from buying at 21.00 to 10452.2 ( 10339,8 It was another system )1 user thanked author for this post.
11/08/2016 at 4:10 PM #1618311/08/2016 at 4:15 PM #16185Little difference is the slippage. And in the backtest you see it popping up 4 hours later. That delay is also between BT and real is also normal.
So thats clear than.
May i ask which system you used that ordered a buy at 10.339,8?
Thanks.
regards,
-
AuthorPosts
Find exclusive trading pro-tools on