Pathfinder DAX 4H

Pathfinder DAX 4H
Hi guys,

I want to share one of my DAX trading ideas based on simple daily, weekly and monthly high/low crossings. I observed that simple cross over and cross under of daily/weekly/monthly high/lows in combination with a multiple smoothed average and some simple filters could be a profitable approach. On the long side the cumulation of orders could be a performance booster for this system.

Comments and suggestions for improvement are welcome.

Have fun

Reiner
// Pathfinder DAX 4H, 9-22, 2 points spread
// DAX breakout system triggered by previous daily, weekly and monthly high/low crossings
// Version 3

// ProOrder code parameter
DEFPARAM CUMULATEORDERS = true  // cumulate orders if not turned off
DEFPARAM PRELOADBARS = 10000

// trading window 8-22
ONCE startTime = 80000
ONCE endTime = 220000

// smoothed average parameter (signalline)
ONCE periodFirstMA = 5
ONCE periodSecondMA = 10
ONCE periodThirdMA = 3

// filter parameter
ONCE periodLongMA = 250
ONCE periodShortMA = 50

// trading paramter
ONCE PositionSize = 1

// money and position management parameter
ONCE stoppLoss = 5 // in %
ONCE takeProfitLong = 2 // in %
ONCE takeProfitShort = 1.75 // in %

ONCE maxCandlesLongWithProfit = 18  // take long profit latest after 18 candles
ONCE maxCandlesShortWithProfit = 13  // take short profit latest after 13 candles
ONCE maxCandlesLongWithoutProfit = 30  // limit long loss latest after 30 candles
ONCE maxCandlesShortWithoutProfit = 25  // limit short loss latest after 25 candles

ONCE startShortPattern = 4 // April
ONCE endShortPattern = 9   // September
ONCE longPositionMultiplier = 2  // multiplier for long position size in case of higher saisonal probability
ONCE shortPositionMultiplier = 2  // multiplier for short position size in case of higher saisonal probability

// calculate daily high/low
dailyHigh = DHigh(1)
dailyLow = DLow(1)

// calculate weekly high/low
If DayOfWeek < DayOfWeek[1] then
weeklyHigh = Highest[BarIndex - lastWeekBarIndex](dailyHigh)
lastWeekBarIndex = BarIndex
ENDIF

// calculate monthly high/low
If Month <> Month[1] then
monthlyHigh = Highest[BarIndex - lastMonthBarIndex](dailyHigh)
monthlyLow = Lowest[BarIndex - lastMonthBarIndex](dailyLow)
lastMonthBarIndex = BarIndex
ENDIF

// calculate signalline with multiple smoothed averages
firstMA = WilderAverage[periodFirstMA](close)
secondMA = TimeSeriesAverage[periodSecondMA](firstMA)
signalline = TimeSeriesAverage[periodThirdMA](secondMA)

// trade only in trading window 8-22
IF Time >= startTime AND Time <= endTime THEN

// filter criteria because not every breakout is profitable
c1 = close > Average[periodLongMA](close)
c2 = close < Average[periodLongMA](close)
c3 = close > Average[periodShortMA](close)
c4 = close < Average[periodShortMA](close)

// saisonal pattern
saisonalShortPattern = CurrentMonth >= startShortPattern AND CurrentMonth <= endShortPattern

// long position conditions
l1 = signalline CROSSES OVER monthlyHigh
l2 = signalline CROSSES OVER weeklyHigh
l3 = signalline CROSSES OVER dailyHigh
l4 = signalline CROSSES OVER monthlyLow

// short position conditions
s1 = signalline CROSSES UNDER monthlyHigh
s2 = signalline CROSSES UNDER monthlyLow
s3 = signalline CROSSES UNDER dailyLow

// long entry
IF ( l1 OR l4 OR l2 OR (l3 AND c2) ) THEN  // cumulate orders for long trades
IF not saisonalShortPattern THEN
BUY PositionSize * longPositionMultiplier CONTRACT AT MARKET
ELSE
BUY PositionSize CONTRACT AT MARKET
ENDIF
takeProfit = takeProfitLong
ENDIF

// short entry
IF NOT SHORTONMARKET  AND ( (s1 AND c3) OR (s2 AND c4)  OR (s3 AND c1) ) THEN // no cumulation for short trades
IF saisonalShortPattern THEN
SELLSHORT positionSize * shortPositionMultiplier CONTRACT AT MARKET
ELSE
SELLSHORT positionSize CONTRACT AT MARKET
ENDIF
takeProfit = takeProfitShort
ENDIF

// stop and profit management
posProfit = (((close - positionprice) * pointvalue) * countofposition) / pipsize

m1 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithProfit
m2 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithProfit
m3 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithoutProfit
m4 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithoutProfit

IF LONGONMARKET AND (m1 OR m3) THEN
SELL AT MARKET
ENDIF
IF SHORTONMARKET AND (m2 OR m4) THEN
EXITSHORT AT MARKET
ENDIF

SET STOP %LOSS stoppLoss
SET TARGET %PROFIT takeProfit

ENDIF
  Many other instruments and continuously updated versions are available in the dedicated forum topic of this automated trading strategy, everyone can read and participate here: Pathfinder trading strategy forum topic
Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

New! PRC is also now on YouTube, subscribe to our channel for exclusive content and tutorials

  1. larouedegann • 293 days ago #

    Thank you REINER for your help.

    I’m working a system TRADING with the DAX 3 minutes based on the bollinger bands,but for the moment it’s very difficult.

    I use your systems with sometimes some errors between the reality and the backtest.And particulary the TREND SURFER DAX 5mn.But overall it’s ok.

    bye bye

     

  2. Doctrading • 293 days ago #

    Hello,

    This strategy seems to work very well on the DAX, H4 timeframe. Thanks for sharing.

    But do you know why it is loosing money before 2009, and earning very well since 2009 ?

    Is it a problem of trading hours ?? (maybe the trading hours were different before 2009 ?)

    Best regards,

  3. Doctrading • 293 days ago #

     

    I see that on ProRealTime CFD, the DAX had no quote / price before august 2010.

  4. Reiner • 293 days ago #

    Hi Doctrading,

    Thanks for your comment.

    as an IG customer it’s a pitty that backtesting is only possible since 2013. It’s good to know that it was profitable before 2013.

    2007 – 2008 were hard years for trading due the financial crises and I suppose that for this scenario the short conditions are insufficient.

    Even an idea is to set the PositionSize for the short trades depending on saisonal pattern. Perhaps you find something that is better than this suggestion.

    regards

    Reiner

    // saisonal pattern
    saisonalShortPattern = CurrentMonth > 3 AND CurrentMonth < 10 // April - September
    
    // short entry
    IF NOT SHORTONMARKET AND ( (s1 AND c3) OR (s2 AND c4)  OR (s3 AND c1) ) THEN // no cumulation for short trades
    IF saisonalShortPattern THEN
    SELLSHORT PositionSize * 2 CONTRACT AT MARKET // double position size by higher saisonal probability
    ELSE
    SELLSHORT PositionSize CONTRACT AT MARKET
    ENDIF
    ENDIF

     

  5. Reiner • 293 days ago #

    Doctrading

    You found the reason. Sorry, I only saw your first comment.

    Reiner

  6. absent1980 • 291 days ago #

    Thanks for sharing. Backtesting almost too good to be true, however there was almost 20% loss of equity in one trade. 

  7. maxHolm • 290 days ago #

    when i do the proback test i only get 9 trades for the last 16 years, that cant be correct? anyone know what i might be doing wrong? 

     

  8. flowsen123 • 288 days ago #

    Hey Reiner,

    nice code, as always! Thanks a lot.

    In the code you have definded the trading window from 08:00 to 22:00. But some positions are open for several days and even during the weekend. Is this supposed to happen?

    Cheers

    Flo

  9. Reiner • 288 days ago #

    Hi Flo,

    Yes, that’s the expectation. Pathfinder is not an intraday strategy and positions could hold for several days until stop or exit conditions closed the trade. I’m still work on improvements, e.g. the position management for the short side depending on saisonal pattern is promising. I’m not happy with the exit rules and have tested many complex things but at the end of the day the simple %stop is the best solution so far.

    regards

    Reiner

  10. jamesgodfrey80 • 286 days ago #

    Hi Reiner,

      Thanks for sharing,  Some nice parts to play with.

     thanks,

    james

  11. Reiner • 286 days ago #

    in order to understand the system better it’s helpful to see the relevant things, here is Pathfinder as indicator with the relevant lines and levels

    // Pathfinder
    
    // daily high/low
    dailyHigh = DHigh(1)
    dailyLow = DLow(1)
    
    // weekly high/low
    Once lastWeekBarIndex = 0
    Once weeklyHigh = undefined
    Once weeklyLow = undefined
    
    If DayOfWeek < DayOfWeek[1] then
    weeklyHigh = Highest[BarIndex - lastWeekBarIndex](DHigh(1))
    weeklyLow = Lowest[BarIndex - lastWeekBarIndex](DLow(1))
    lastWeekBarIndex = BarIndex
    ENDIF
    
    // monthly high/low
    Once lastMonthBarIndex = 0
    Once monthlyHigh = undefined
    Once monthlyLow = undefined
    
    If Month<>Month[1] then
    monthlyHigh = Highest[BarIndex - lastMonthBarIndex](DHigh(1))
    monthlyLow = Lowest[BarIndex - lastMonthBarIndex](DLow(1))
    lastMonthBarIndex = BarIndex
    ENDIF
    
    // signalline
    firstMA = WilderAverage[5](close)
    secondMA = TimeSeriesAverage[10](firstMA)
    signalline = TimeSeriesAverage[5](secondMA)
    
    // filter
    ma50 = Average[50]
    ma200 = Average[200]
    
    return signalline AS "signal line", dailyHigh AS "daily High", dailyLow AS "daily Low", weeklyHigh AS "weekly High", weeklyLow AS "weekly Low", monthlyHigh AS "monthly High", monthlyLow AS "monthly Low", ma50 AS "average[50]", ma200 AS "average[200]"
    

     

  12. markouk • 286 days ago #

    Massive gains on this strategy since Friday….”If only it was real money”

  13. Elsborgtrading • 285 days ago #

    Hi Reiner. I decided to try and live test your code, but seems like it has insufficient data to begin with- so it never starts

  14. Elsborgtrading • 285 days ago #

    Here is the screenshoot of the error it generates. http://prntscr.com/brssm3 Anyway great code, that backtest really well.

    • Reiner • 285 days ago #

      Hi Elsborgtrading,

      Welcome and thanks for your comment.

      the message is clear, PRT is not happy with the pre loaded bars in order to calculate all used indicators. Default are 1000 bars and that shoud be enough for the used indicators. In my IG PRT environment it works without any problem in backtesting and real trading mode. In which environment do you get this message?

      I suggest to raise the bar size with the mentioned command, add the following line after the first Defparam command and play around with the size: DEFPARAM PRELOADBARS = 2000

      regards

      Reiner

  15. Reiner • 285 days ago #

    the following link shows some pictures of Pathfinder detail information

    https://www.evernote.com/shard/s80/sh/3c8432cd-63f5-4301-a3cb-9a9dd5c8713b/743defcc06fa10ab3a514b9e34fbf76a

  16. AleX • 285 days ago #

    Thx for share Reiner very good TS

  17. Reiner • 282 days ago #

    Pathfinder version 2 released.

    The new version include some position management extensions like e.g. saisonal pattern as booster for short trades and maximal days hold feature to save profits and limit losses.

    The following link shows some additional infos.

    https://www.evernote.com/shard/s80/sh/3c8432cd-63f5-4301-a3cb-9a9dd5c8713b/743defcc06fa10ab3a514b9e34fbf76a

    // Pathfinder DAX 4H, 8-22, 2 points spread
    // DAX breakout system triggered by previous daily, weekly and monthly high/low crossings
    // Version 2
    
    // code parameter
    DEFPARAM CUMULATEORDERS = true  // cumulate orders if not switch off
    DEFPARAM PRELOADBARS = 1000
    
    // trading window 8-22
    ONCE startTime = 80000
    ONCE endTime = 220000
    
    // smoothed average parameter (signalline)
    periodFirstMA = 5
    periodSecondMA = 10
    periodThirdMA = 5
    
    // filter parameter
    periodLongMA = 200
    periodShortMA = 50
    
    // trading paramter
    ONCE positionSize = 10
    
    // money and position management parameter
    ONCE stoppLoss = 3  // in %
    ONCE takeProfit = 1.5  // in %
    
    ONCE maxDaysWithProfit = 3  // take profit after 3 days
    ONCE maxDaysWithoutProfit = 5  // limit loss after 5 days
    
    ONCE startShortPattern = 4 // April
    ONCE endShortPattern = 9   // September
    
    ONCE shortPositionMultiplier = 2  // double short position size in case of higher saisonal probability
    
    // calculate weekly high/low
    If DayOfWeek < DayOfWeek[1] then
    weeklyHigh = Highest[BarIndex - lastWeekBarIndex](DHigh(1))
    lastWeekBarIndex = BarIndex
    ENDIF
    
    // calculate monthly high/low
    If Month <> Month[1] then
    monthlyHigh = Highest[BarIndex - lastMonthBarIndex](DHigh(1))
    monthlyLow = Lowest[BarIndex - lastMonthBarIndex](DLow(1))
    lastMonthBarIndex = BarIndex
    ENDIF
    
    // calculate signalline with multiple smoothed averages
    firstMA = WilderAverage[periodFirstMA](close)
    secondMA = TimeSeriesAverage[periodSecondMA](firstMA)
    signalline = TimeSeriesAverage[periodThirdMA](secondMA)
    
    // trade only in trading window 8-22
    IF Time >= startTime AND Time <= endTime THEN
    
    // filter criteria because not every breakout is profitable
    c1 = close > Average[periodLongMA](close)
    c2 = close < Average[periodLongMA](close)
    c3 = close > Average[periodShortMA](close)
    c4 = close < Average[periodShortMA](close)
    
    // saisonal pattern
    saisonalShortPattern = CurrentMonth >= startShortPattern AND CurrentMonth <= endShortPattern
    
    // long position conditions
    l1 = signalline CROSSES OVER monthlyHigh
    l2 = signalline CROSSES OVER weeklyHigh
    l3 = signalline CROSSES OVER DHigh(1)
    l4 = signalline CROSSES OVER monthlyLow
    
    // short position conditions
    s1 = signalline CROSSES UNDER monthlyHigh
    s2 = signalline CROSSES UNDER monthlyLow
    s3 = signalline CROSSES UNDER Dlow(1)
    
    // long entry
    IF ( l1 OR l4 OR l2 OR (l3 AND c2) ) THEN  // cumulate orders for long trades
    BUY PositionSize CONTRACT AT MARKET
    ENDIF
    
    // short entry
    IF NOT SHORTONMARKET AND ( (s1 AND c3) OR (s2 AND c4)  OR (s3 AND c1) ) THEN // no cumulation for short trades
    IF saisonalShortPattern THEN
    SELLSHORT positionSize * shortPositionMultiplier CONTRACT AT MARKET
    ELSE
    SELLSHORT positionSize CONTRACT AT MARKET
    ENDIF
    ENDIF
    
    // stop and profit management
    posProfit = (((close - positionprice) * pointvalue) * countofposition) / pipsize
    
    m1 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxDaysWithProfit * 5  // 5*4H candles are one day
    m2 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxDaysWithoutProfit * 5
    
    IF ONMARKET AND m1 OR m2 THEN
    IF SHORTONMARKET THEN
    EXITSHORT positionSize SHARES AT MARKET
    ENDIF
    IF LONGONMARKET THEN
    SELL positionSize SHARES AT MARKET
    ENDIF
    ENDIF
    
    SET STOP %LOSS stoppLoss
    SET TARGET %PROFIT takeProfit
    
    ENDIF
    

     

  18. AleX • 282 days ago #

    Hello, the system in backtest seems work but go on live, seems that have a problem. 

    Like: Partial close of position 

    Le seguenti modifiche sono state applicate prima dell’invio del codice a ProOrder:

    – I sistemi di trading con ordini che chiudono parzialmente una posizione non possono essere inviati a ProOrder (ad es. SELL 3 SHARES AT MARKET).

    Assicurati che non sia specificata nessuna quantità nelle istruzioni che chiudono le posizioni (in questo caso, l’istruzione chiude l’intera posizione). Ad es.
    SELL AT MARKET
    EXITSHORT AT 1.5 LIMIT

    • Reiner • 282 days ago #

      Hi AleX,

      Thanks for your comment. I see what you mean. For real mode trading you have to replace the following lines:

      Sorry for the confusion.

      Reiner

      IF ONMARKET AND m1 OR m2 THEN
      IF SHORTONMARKET THEN
      EXITSHORT AT MARKET
      ENDIF
      IF LONGONMARKET THEN
      SELL AT MARKET
      ENDIF
      ENDIF
      

       

  19. Reiner • 282 days ago #

    Pathfinder version 2 update. Bug fixing for real mode trading.

    // Pathfinder DAX 4H, 8-22, 2 points spread
    // DAX breakout system triggered by previous daily, weekly and monthly high/low crossings
    // Version 2
    
    // code parameter
    DEFPARAM CUMULATEORDERS = true  // cumulate orders if not switch off
    DEFPARAM PRELOADBARS = 1000
    
    // trading window 8-22
    ONCE startTime = 80000
    ONCE endTime = 220000
    
    // smoothed average parameter (signalline)
    periodFirstMA = 5
    periodSecondMA = 10
    periodThirdMA = 5
    
    // filter parameter
    periodLongMA = 200
    periodShortMA = 50
    
    // trading paramter
    ONCE positionSize = 1
    
    // money and position management parameter
    ONCE stoppLoss = 3  // in %
    ONCE takeProfit = 1.5  // in %
    
    ONCE maxDaysWithProfit = 3  // take profit after 3 days
    ONCE maxDaysWithoutProfit = 5  // limit loss after 5 days
    
    ONCE startShortPattern = 4 // April
    ONCE endShortPattern = 9   // September
    
    ONCE shortPositionMultiplier = 2  // double short position size in case of higher saisonal probability
    
    // calculate weekly high/low
    If DayOfWeek < DayOfWeek[1] then
    weeklyHigh = Highest[BarIndex - lastWeekBarIndex](DHigh(1))
    lastWeekBarIndex = BarIndex
    ENDIF
    
    // calculate monthly high/low
    If Month <> Month[1] then
    monthlyHigh = Highest[BarIndex - lastMonthBarIndex](DHigh(1))
    monthlyLow = Lowest[BarIndex - lastMonthBarIndex](DLow(1))
    lastMonthBarIndex = BarIndex
    ENDIF
    
    // calculate signalline with multiple smoothed averages
    firstMA = WilderAverage[periodFirstMA](close)
    secondMA = TimeSeriesAverage[periodSecondMA](firstMA)
    signalline = TimeSeriesAverage[periodThirdMA](secondMA)
    
    // trade only in trading window 8-22
    IF Time >= startTime AND Time <= endTime THEN
    
    // filter criteria because not every breakout is profitable
    c1 = close > Average[periodLongMA](close)
    c2 = close < Average[periodLongMA](close)
    c3 = close > Average[periodShortMA](close)
    c4 = close < Average[periodShortMA](close)
    
    // saisonal pattern
    saisonalShortPattern = CurrentMonth >= startShortPattern AND CurrentMonth <= endShortPattern
    
    // long position conditions
    l1 = signalline CROSSES OVER monthlyHigh
    l2 = signalline CROSSES OVER weeklyHigh
    l3 = signalline CROSSES OVER DHigh(1)
    l4 = signalline CROSSES OVER monthlyLow
    
    // short position conditions
    s1 = signalline CROSSES UNDER monthlyHigh
    s2 = signalline CROSSES UNDER monthlyLow
    s3 = signalline CROSSES UNDER Dlow(1)
    
    // long entry
    IF ( l1 OR l4 OR l2 OR (l3 AND c2) ) THEN  // cumulate orders for long trades
    BUY PositionSize CONTRACT AT MARKET
    ENDIF
    
    // short entry
    IF NOT SHORTONMARKET AND ( (s1 AND c3) OR (s2 AND c4)  OR (s3 AND c1) ) THEN // no cumulation for short trades
    IF saisonalShortPattern THEN
    SELLSHORT positionSize * shortPositionMultiplier CONTRACT AT MARKET
    ELSE
    SELLSHORT positionSize CONTRACT AT MARKET
    ENDIF
    ENDIF
    
    // stop and profit management
    posProfit = (((close - positionprice) * pointvalue) * countofposition) / pipsize
    
    m1 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxDaysWithProfit * 5  // 5*4H candles are one day
    m2 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxDaysWithoutProfit * 5
    
    IF ONMARKET AND m1 OR m2 THEN
    IF SHORTONMARKET THEN
    EXITSHORT AT MARKET
    ENDIF
    IF LONGONMARKET THEN
    SELL AT MARKET
    ENDIF
    ENDIF
    
    SET STOP %LOSS stoppLoss
    SET TARGET %PROFIT takeProfit
    
    ENDIF

     

    • Nicolas • 282 days ago #

      Hi Reiner and many thanks again for contributing to the Library. Do you want me to change the code and file of the post?

  20. Reiner • 282 days ago #

    Hi Nicolas and thanks for your offer. Yes please make an update. With version 2 everything is finished what I had planed so  far.  Let’s make money with it. Reiner

    • Nicolas • 280 days ago #

      The post code and file has been updated to your last version (version 2)

  21. Jesús • 281 days ago #

    Hi Reiner,

    Thanks for sharing your strategy and code. It seems to work very well on demo, Congratulations.

    • Reiner • 281 days ago #

      Hi Jesús,

      Welcome and thanks for your comment. Yes backtest looks realy promising. Yesterday I have started the robot for real trading let’s see how it works in real life.

      regards

      Reiner

  22. Bolu14 • 281 days ago #

    Yes, its really look good. I will try to run this live, for the beginning with a smaller Positionsize.

    The problem in the automatic systems are, that we check in few minutes a Timeframe of 4 years and see, that we can earn money. But in Real, 4 Years are a lot of time. Each Day you will check your system, maybe you will loss money on that day but you have the belive in your System an have to still wait. And i think, that is the most difficult thing at the automatic trading.

    Vielen Dank Reiner für die ganzen tollen Codes. Tradest du die selber auch live ?

    Gruß

    Thanks.

    • Reiner • 280 days ago #

      Hallo Bolu14,

      Danke für deinen Kommentar und Willkommen. Ich trade verschiedene Strategien automatisch oder manuell aber nicht alle die ich hier veröffentlich habe. Pathfinder ist eine Sammlung von Techniken die ich bisher manuell gehandelt habe, den Breakout von Tages- oder Monats Hoch/Tief haben viele Trader auf dem Plan. Bisher ist das System noch in der Entwicklung und ich bin ehrlich selbst überrascht wie gut der Backtest ist. Das Grundgerüst scheint mir robust zu sein, 100% zufrieden bin ich aber noch nicht, da das System doch spät einsteigt und den Trend nicht lange genug mitnimmt  durch die harten Stop und Target Limits. Aber vlt. finden wir gemeinsam ja eine noch bessere Lösung.

      Gruß

      Reiner

  23. Jesús • 280 days ago #

    Hi Reiner,

    I am testing in demo account and for now only made a one positive trade. For me it is too early to put the strategy in real mode, but I hope your comments as you go running in real. Again, thank you very much for your excellent work Rainer.

    • Reiner • 280 days ago #

      Hallo Bolu14,

      Danke für deinen Kommentar und Willkommen. Ich trade verschiedene Strategien automatisch oder manuell aber nicht alle die ich hier veröffentlich habe. Pathfinder ist eine Sammlung von Techniken die ich bisher manuell gehandelt habe, den Breakout von Tages- oder Monats Hoch/Tief haben viele Trader auf dem Plan. Bisher ist das System noch in der Entwicklung und ich bin ehrlich selbst überrascht wie gut der Backtest ist. Das Grundgerüst scheint mir robust zu sein, 100% zufrieden bin ich aber noch nicht, da das System doch spät einsteigt und den Trend nicht lange genug mitnimmt  durch die harten Stop und Target Limits. Aber vlt. finden wir gemeinsam ja eine noch bessere Lösung.

      Gruß

      Reiner

  24. absent1980 • 280 days ago #

    I also have one positive trade on demo. The only thing which concerns me long-term is that stoploss is 3% vs target profit of 1.5%. To my knowledge it means a negative expectancy in the long run because you need consistent 60%+ win/lose ratio to accommodate system requirements.

    • Reiner • 280 days ago #

      Hi absent1980, 

      Thanks for your comment and welcome. You ‘re right. I’m not happy with the hard % limits and 300 points loss is a big number. Maybe we find together a better solution.  regards Reiner

  25. absent1980 • 279 days ago #
    Capital = 10000
    Risk = 0.01
    StopCoefficient = 75 //it can be any number, 75 gives you initial positionsize of 1.
    
    
    REM Calculate contracts
    equity = Capital + StrategyProfit
    maxrisk = round(equity*Risk)
    PositionSize = abs(round((maxrisk/StopCoefficient)/PointValue))
    
    // money and position management parameter
    ONCE stoppLoss =  1 // in % (reduced from 3 to 1)
    ONCE takeProfit = 2.5  // in % (increased from 1.5 to 2.5)

     

  26. absent1980 • 279 days ago #

    This amendment will reduce your system performance on backtesting but you shouldn’t lose more than 1%(or 2% for cumulative positions) of your equity on a trade. R/R ratio is still high enough to be profitable long term due to compounding position sizing. Also may i ask you how much automated optimization have you done? Your system looks very good but over optimizing will make it curve fitted, thus very vulnerable to market changes. 

    • Reiner • 279 days ago #

      I understand what you mean and thanks for your contribution. Give me a moment to play around with your idea. Key feature of Pathfinder is the smoothed average as signalline. The used period lenghts are optimized. Stop and take profit limits and max days holding period values as well. The backtest result is certainly an optimized view but I’m confident that it could work because Pathfinder is a backward engineering of some of my manual but profitable trading techniques. We will see.

    • absent1980 • 279 days ago #

      Also you can try to optimize your system to volatility and trade only if volatility is within certain range. I did some backtesting and noticed better performance.

  27. miguel33 • 277 days ago #

    Il timing è il mio mestiere .

    Dopo aver testato in demo … ieri primo trade in reale …  No comment  (solo parolacce)

    Comunque in base alla mia esperienza , un trade negativo , anche se il primo , non condiziona il mio giudizio sul codice che ritengo tra i più validi in circolazione.

    peccato sarebbe stato più bello partire con un gain .

    Grazie comunque per il tuo contributo Reiner .

    miguel

  28. Petrus • 272 days ago #

    Hi Reiner.

    First of all, thanks for sharing this exceptional system code with all of us.

    I also agree with absent1980 as I also understand that a system with a stop loss of 3% against a take profit of 1,5% should be a long term loser. This is not the case with the backtests I did.

    With the backtest between 4th of January and 18/07, I got a profit of 21.282€. However, changing this fix nr. by a variable number and substituting the take profit of 1.5% by a 2.3%, the backtest increases the profit up to 27.641€. Do you recommend to increase this take profit in general, or this could be a too high risk to work normally with? And do you also think that reducing the stop loss could be a solution to minimize the losses? Although you have an excellent ratio benefits/losses…

    Und danke für deine Hilfe für die Anfänger wie ich.

    Grüsse

    Petrus

    • Reiner • 272 days ago #

      Hi Petrus,

      Thanks for your comment and welcome. The stop loss in Pathfinder works in a sense of a disaster stopp. You can omit it or set it to a higher value like e.g 5% without lose significant performance. The take profit limit depends to your willingness to take risk. Higher profit limits lead to higher performance and lower profitable trade rates. Personally I prefer trading systems with 70% rate of profitable trades. A good take profit limit is 2%.

      regards

      Reiner

  29. Yannick • 272 days ago #

    Dear Reiner

    Thanks for sharing all your codes,

    rather than using fix profit limit and stop loss, have you tried to use weekly/daily pivot point for exit?

    Regards

    Yannick

    • Reiner • 271 days ago #

      Bonjour Yannick,

      Thanks for your comment and welcome. I didn’t test pivots as exit trigger but this idea would be worth to test.

      regards

      Reiner

    • Reiner • 271 days ago #

      Yannick, I have made a “quick and dirty” test of your idea. Results were partially better but drawdowns were higher and the rate of profitable trades were under 50%. Weekly pivots delivered the best results. Here is the code to play around – just uncomment the related pivot calculations. regards Reiner

      // Pathfinder DAX 4H, 8-22, 2 points spread
      // DAX breakout system triggered by previous daily, weekly and monthly high/low crossings
      // Version test pivots as exit trigger
      
      // code parameter
      DEFPARAM CUMULATEORDERS = true  // cumulate orders if not turned off
      DEFPARAM PRELOADBARS = 1000
      
      // trading window 8-22
      ONCE startTime = 80000
      ONCE endTime = 220000
      
      // smoothed average parameter (signalline)
      periodFirstMA = 5
      periodSecondMA = 10
      periodThirdMA = 5
      
      // filter parameter
      periodLongMA = 200
      periodShortMA = 50
      
      // trading paramter
      positionSize = 1
      
      // money and position management parameter
      ONCE startShortPattern = 4 // April
      ONCE endShortPattern = 9   // September
      
      ONCE shortPositionMultiplier = 2  // double short position size in case of higher saisonal probability
      
      // daily pivots
      //dailyPivot = (DHigh(1) + DLow(1) + Close[1]) / 3
      //dailyR1 = 2*dailyPivot - DLow(1)
      //dailyS1 = 2*dailyPivot - DHigh(1)
      //dailyR2 = dailyPivot + (DHigh(1) - DLow(1))
      //dailyS2 = dailyPivot - (DHigh(1) - DLow(1))
      //dailyR3 = dailyR1 + (DHigh(1) - DLow(1))
      //dailyS3 = dailyS1 - (DHigh(1) - DLow(1))
      
      // calculate weekly high/low and pivots
      If DayOfWeek < DayOfWeek[1] then
      weeklyHigh = Highest[BarIndex - lastWeekBarIndex](DHigh(1))
      weeklyLow = Lowest[BarIndex - lastWeekBarIndex](DLow(1))
      lastWeekBarIndex = BarIndex
      
      weeklyPivot = (weeklyHigh + weeklyLow + DClose(1)) / 3
      weeklyR1 = 2*weeklyPivot - weeklyLow
      weeklyS1 = 2*weeklyPivot - weeklyHigh
      //weeklyR2 = weeklyPivot + (weeklyHigh - weeklyLow)
      //weeklyS2 = weeklyPivot - (weeklyHigh - weeklyLow)
      weeklyR3 = weeklyR1 + (weeklyHigh - weeklyLow)
      weeklyS3 = weeklyS1 - (weeklyHigh - weeklyLow)
      ENDIF
      
      // calculate monthly high/low and pivots
      If Month <> Month[1] then
      monthlyHigh = Highest[BarIndex - lastMonthBarIndex](DHigh(1))
      monthlyLow = Lowest[BarIndex - lastMonthBarIndex](DLow(1))
      lastMonthBarIndex = BarIndex
      
      //monthlyPivot = (monthlyHigh + monthlyLow + DClose(1)) / 3
      //monthlyR1 = 2*monthlyPivot - monthlyLow
      //monthlyS1 = 2*monthlyPivot - monthlyHigh
      //monthlyR2 = monthlyPivot + (monthlyHigh - monthlyLow)
      //monthlyS2 = monthlyPivot - (monthlyHigh - monthlyLow)
      //monthlyR3 = monthlyR1 + (monthlyHigh - monthlyLow)
      //monthlyS3 = monthlyS1 - (monthlyHigh - monthlyLow)
      ENDIF
      
      // calculate signalline with multiple smoothed averages
      firstMA = WilderAverage[periodFirstMA](close)
      secondMA = TimeSeriesAverage[periodSecondMA](firstMA)
      signalline = TimeSeriesAverage[periodThirdMA](secondMA)
      
      // trade only in trading window 8-22
      IF Time >= startTime AND Time <= endTime THEN
      
      // filter criteria because not every breakout is profitable
      c1 = close > Average[periodLongMA](close)
      c2 = close < Average[periodLongMA](close)
      c3 = close > Average[periodShortMA](close)
      c4 = close < Average[periodShortMA](close)
      
      // saisonal pattern
      saisonalShortPattern = CurrentMonth >= startShortPattern AND CurrentMonth <= endShortPattern
      
      // long position conditions
      l1 = signalline CROSSES OVER monthlyHigh
      l2 = signalline CROSSES OVER weeklyHigh
      l3 = signalline CROSSES OVER DHigh(1)
      l4 = signalline CROSSES OVER monthlyLow
      
      // short position conditions
      s1 = signalline CROSSES UNDER monthlyHigh
      s2 = signalline CROSSES UNDER monthlyLow
      s3 = signalline CROSSES UNDER Dlow(1)
      
      // long entry
      IF ( l1 OR l4 OR l2 OR (l3 AND c2) ) THEN  // cumulate orders for long trades
      BUY PositionSize CONTRACT AT MARKET
      ENDIF
      
      // short entry
      IF NOT SHORTONMARKET AND ( (s1 AND c3) OR (s2 AND c4)  OR (s3 AND c1) ) THEN // no cumulation for short trades
      IF saisonalShortPattern THEN
      SELLSHORT positionSize * shortPositionMultiplier CONTRACT AT MARKET
      ELSE
      SELLSHORT positionSize CONTRACT AT MARKET
      ENDIF
      ENDIF
      
      // stop and profit management triggered by pivots
      // long
      IF LONGONMARKET AND close CROSSES OVER weeklyR3 THEN // take profit
      SELL AT MARKET
      ENDIF
      IF LONGONMARKET AND close CROSSES UNDER weeklyS3 THEN // stop
      SELL AT MARKET
      ENDIF
      // short
      IF SHORTONMARKET AND close CROSSES UNDER weeklyS3 THEN  // take profit
      EXITSHORT AT MARKET
      ENDIF
      IF SHORTONMARKET AND close CROSSES OVER weeklyR3 THEN // stop
      EXITSHORT AT MARKET
      ENDIF
      
      ENDIF


  30. miguel33 • 271 days ago #

    Hi Reiner ,

    oggi il codice ha generato un ordine long mentre in backtest e’ sempre short  dal 19 luglio.

    come mai questa diseguaglianza ?

    Grazie .

    miguel

    • Reiner • 271 days ago #

      Hi Miguel,

      Pathfinder closed at 9:00 the short postion and opened in the same transaction a long position at 10190. Trigger was that signalline crossed over the weekly high. Backtest mode needs one additional candle to display the syncronized events. regards Reiner

       

  31. miguel33 • 271 days ago #

    Si ho visto adesso .

    Grazie per la tua cortesia.

    miguel

     

  32. siaoman • 269 days ago #

    Hi Reiner,

    Great system and thank you for sharing it with the community here.

    I’m having trouble with setting this part of the code working for my timezone (GMT+8 Australia AWST):

    // trading window 8-22
    ONCE startTime = 80000
    ONCE endTime = 220000

    For me, DAX opens @ 1500 and closes @ 2330 for 1pt spread. 2pt spread ends at 0500.

    The problem I’m having is that I’m not sure how I can modify the code to take into account my timezone since the below code doesn’t work:

    // trading window 8-22
    ONCE startTime = 150000
    ONCE endTime = 050000

    I haven’t yet found a way for it to work, and is a common issue I face quite often with systems that work through till the end of 2pt spread session.

    Are you able to shed some light on this and help if possible?

    Thanks again Reiner, love your work by the way especially with the DAX up/down and DAX Bluemoon!

     

    Siaoman

    • Reiner • 268 days ago #

      Hi Siaoman,

      Thanks for your comment and welcome. I asume the problem is that the used indicator calculation doesn’t work correctly in different timezones. Please check workstation-options and timezone settings or check the forum for relevant topics. I have found a related discussion here: http://www.prorealcode.com/topic/proorder-and-customized-time-zones/

      regards

      Reiner

  33. luigiR • 268 days ago #

    Hi Reiner. I start pathfinder in real on 23/07 but at today it’s doesn’t start. what you think about this? It’s normal or my proorder get some trouble?

    thank you for sharing your strategy

  34. Petrus • 268 days ago #

    Hi Reiner.

    In order to solve the IG problem on mondays (DHigh[1] is then the High from Sunday), perhaps you could try this solution I programmed:

    a1=DayOfWeek
    b1=DHigh(1)
    b2=DHigh(2)
    c1=DLow(1)
    c2=DLow(2)
    d1=DClose(1)
    d2=DClose(2)
    IF a1=1 THEN
    b1=b2
    c1=c2
    d1=d2
    ELSE
    b1=b1
    c1=c1
    d1=d1
    ENDIF
    
    H1 = b1//High
    L1 = c1//Low
    C = d1//Close
    
    Pivot = (H1 + L1 + C) / 3
    
    RETURN b1 AS "DHigh[1]", c1 AS "DLow[1]", Pivot AS "Pivot Point[1]"
    

     

    It is not 100% perfect, but it works.

    Regards

    Petrus

    • Reiner • 268 days ago #

      Petrus, I have made a quick test of your idea. Results with weekly pivots were not better. Replace Pathfinders DHigh/DLow calculation of weekly and monthly high/low leads not to better results as well. It seems that for Pathfinder the “IG problem” is a feature and not a bug.

      See below the code I have used.

      regards Reiner

      IF dayOfWeek = 1 THEN
      dayHigh = DHigh(2)
      dayLow = DLow(2)
      dayClose = DClose(2)
      ENDIF
      
      IF dayOfWeek >=2 and dayOfWeek < 6 THEN
      dayHigh = DHigh(1)
      dayLow = DLow(1)
      dayClose = DClose(1)
      ENDIF
      
      dailyPivot = (dayHigh + dayLow + dayClose) / 3
      
      // calculate weekly high/low and pivots
      If DayOfWeek < DayOfWeek[1] then
      weeklyHigh = Highest[BarIndex - lastWeekBarIndex](dayHigh)
      weeklyLow = Lowest[BarIndex - lastWeekBarIndex](dayLow)
      lastWeekBarIndex = BarIndex
      
      weeklyPivot = (weeklyHigh + weeklyLow + dayClose) / 3
      weeklyR1 = 2*weeklyPivot - weeklyLow
      weeklyS1 = 2*weeklyPivot - weeklyHigh
      //weeklyR2 = weeklyPivot + (weeklyHigh - weeklyLow)
      //weeklyS2 = weeklyPivot - (weeklyHigh - weeklyLow)
      weeklyR3 = weeklyR1 + (weeklyHigh - weeklyLow)
      weeklyS3 = weeklyS1 - (weeklyHigh - weeklyLow)
      ENDIF

       

  35. luigiR • 265 days ago #

    hi reiner, proorder tell my error message for preloadbars, I change 1000 in 2000,it’s ok?

    thanks for your answer and for your system

    • Reiner • 265 days ago #

      Luigi, you can set this parameter to every value as long as proorder is happy with it. I never had this problem in backtest or real mode. In which environment you are getting this message?

  36. luigiR • 265 days ago #

    Hi reiner, thanks for your reply in advance….I’m trying to launch pathfinder in real with 1 contract with Dax and the same for CAC and FTSE100. It’s strange because this night Pathfinder try to start CAC and FTSE100 and proorder stop them with the message of the preloadbars, so on DAX never start and I’m waiting to see what pathfinder do in real. I write from Italy and my platform is IG.

    Have you something to suggest me? ( I think thet your system is very good and then I  would spend time to see what the system do in real instead of waiting)

    thank you very much

  37. Reiner • 265 days ago #

    Luigi, Pathfinder works with cumulative and variable order sizes maybe that’s your problem. When you start Pathfinder and proorder is asking after the max position size set a higher value then 1 also if you have set positionSize to 1 in Pathfinder’s code. Take care with CAC and FTSE100 – Pathfinder was not tested with these instruments.

  38. luigiR • 264 days ago #

    Hi reainer and Thanks again for your reply, I saw that also in my backtest pathfinder don’t start from 27 july, it’s correct?

    • Reiner • 264 days ago #

      Luigi, Pathfinder shorted the DAX at 10130 today.

  39. luigiR • 264 days ago #

    Hi reiner, today afternoon pathfinder start  in real 2 contracts on Dax and 2 in Cac, I see that don’t start in backtest….why?

    I don’t change nothing of your version 2 ready for real trading

    • Reiner • 264 days ago #

      PRT will synchronize the trading events in backtest mode after an additional candle. 

  40. OldGerman • 264 days ago #

    Perfekt !!

  41. luigiR • 264 days ago #

    Ho reiner, Yes in Dax 2 position open at 10130,5 and 2 position at 10128,5… I don’t know why 

    on cac open 2 position at 4319,9

     

  42. miguel33 • 263 days ago #

    Reiner 

    Mi puoi spiegare perché  inserendo lo stesso codice in prt 10.2   e prt 10.3  ho dei risultati diversi ?

    Ieri per esempio nella versione 10.3 mi fa uscire in profit (entrato prima in short) mentre nella versione  10.2 m

    fa entrare short .

    cosa non capisco ?

    grazie per la tua collaborazione e cortesia .

    miguel

    • Reiner • 262 days ago #

      Miguel, 

      as IG customer currently only 10.2 is available for me. I haven’t used 10.3 so far and unfortunately I have no answer to your question. – regards Reiner

  43. absent1980 • 257 days ago #

    Good move on DAX today.

  44. mofiman • 247 days ago #

    Hallo Reiner,

    Really impressed by this strategy, vielen dank for sharing it. I’ve been reading a couple of times to completely understand the workflow and I just wondered why maxDaysWith and WithoutProfit are * 5 as maybe stupidely, I always thought that there where 6 candles of 4 hours in a day. To be sure I changed maxDays by MaxCandles to test. The optimal result shows 16 candles with profit and a different number withoutProfit, depending on if it is a long or a short trade. As it works great “like it is”, and just to be sure, is there in your opinion any special reason to keep the MaxDays and with *5 without breaking the global coherency? 

    Thank you again,

    My best regards

    • Reiner • 246 days ago #

      Bonjour mofiman,

      Thanks for your comment and welcome. You are wright using candles is better to understand. I will change this in the next version.

      regards

      Reiner

  45. OldGerman • 247 days ago #

    @mofiman

    yes, 5 * 4H-Candles per Day is not correct but it gives the best result.

  46. mofiman • 247 days ago #

    OK OldGerman, thanks for your reply. So there is nothing against using candles instead of 5 candle packs. Everything is clear now. Thank you again

    best regards

  47. Reiner • 244 days ago #
    Pathfinder version 3 released. I have reorganized the code a little bit to make things clearer. Based on comments and results of the last trades I tried to improve the trading algorithm as well. The main changes are:
     
    • the separation of the limits for long and short trades
    • introduction of seasonal position management for long and short trades
    • the conversion of maximum holding period from days to candles
    • optimizing of some parameters like periodThirdMA, periodLongMA

    Please find more details in Pathfinder Inside.

    https://www.evernote.com/shard/s80/sh/3c8432cd-63f5-4301-a3cb-9a9dd5c8713b/743defcc06fa10ab3a514b9e34fbf76a

    // Pathfinder DAX 4H, 9-22, 2 points spread
    // DAX breakout system triggered by previous daily, weekly and monthly high/low crossings
    // Version 3
    
    // ProOrder code parameter
    DEFPARAM CUMULATEORDERS = true  // cumulate orders if not turned off
    DEFPARAM PRELOADBARS = 10000
    
    // trading window 8-22
    ONCE startTime = 80000
    ONCE endTime = 220000
    
    // smoothed average parameter (signalline)
    ONCE periodFirstMA = 5
    ONCE periodSecondMA = 10
    ONCE periodThirdMA = 3
    
    // filter parameter
    ONCE periodLongMA = 250
    ONCE periodShortMA = 50
    
    // trading paramter
    ONCE PositionSize = 1
    
    // money and position management parameter
    ONCE stoppLoss = 5 // in %
    ONCE takeProfitLong = 2 // in %
    ONCE takeProfitShort = 1.75 // in %
    
    ONCE maxCandlesLongWithProfit = 18  // take long profit latest after 18 candles
    ONCE maxCandlesShortWithProfit = 13  // take short profit latest after 13 candles
    ONCE maxCandlesLongWithoutProfit = 30  // limit long loss latest after 30 candles
    ONCE maxCandlesShortWithoutProfit = 25  // limit short loss latest after 25 candles
    
    ONCE startShortPattern = 4 // April
    ONCE endShortPattern = 9   // September
    ONCE longPositionMultiplier = 2  // multiplier for long position size in case of higher saisonal probability
    ONCE shortPositionMultiplier = 2  // multiplier for short position size in case of higher saisonal probability
    
    // calculate daily high/low
    dailyHigh = DHigh(1)
    dailyLow = DLow(1)
    
    // calculate weekly high/low
    If DayOfWeek < DayOfWeek[1] then
    weeklyHigh = Highest[BarIndex - lastWeekBarIndex](dailyHigh)
    lastWeekBarIndex = BarIndex
    ENDIF
    
    // calculate monthly high/low
    If Month <> Month[1] then
    monthlyHigh = Highest[BarIndex - lastMonthBarIndex](dailyHigh)
    monthlyLow = Lowest[BarIndex - lastMonthBarIndex](dailyLow)
    lastMonthBarIndex = BarIndex
    ENDIF
    
    // calculate signalline with multiple smoothed averages
    firstMA = WilderAverage[periodFirstMA](close)
    secondMA = TimeSeriesAverage[periodSecondMA](firstMA)
    signalline = TimeSeriesAverage[periodThirdMA](secondMA)
    
    // trade only in trading window 8-22
    IF Time >= startTime AND Time <= endTime THEN
    
    // filter criteria because not every breakout is profitable
    c1 = close > Average[periodLongMA](close)
    c2 = close < Average[periodLongMA](close)
    c3 = close > Average[periodShortMA](close)
    c4 = close < Average[periodShortMA](close)
    
    // saisonal pattern
    saisonalShortPattern = CurrentMonth >= startShortPattern AND CurrentMonth <= endShortPattern
    
    // long position conditions
    l1 = signalline CROSSES OVER monthlyHigh
    l2 = signalline CROSSES OVER weeklyHigh
    l3 = signalline CROSSES OVER dailyHigh
    l4 = signalline CROSSES OVER monthlyLow
    
    // short position conditions
    s1 = signalline CROSSES UNDER monthlyHigh
    s2 = signalline CROSSES UNDER monthlyLow
    s3 = signalline CROSSES UNDER dailyLow
    
    // long entry
    IF ( l1 OR l4 OR l2 OR (l3 AND c2) ) THEN  // cumulate orders for long trades
    IF not saisonalShortPattern THEN
    BUY PositionSize * longPositionMultiplier CONTRACT AT MARKET
    ELSE
    BUY PositionSize CONTRACT AT MARKET
    ENDIF
    takeProfit = takeProfitLong
    ENDIF
    
    // short entry
    IF NOT SHORTONMARKET  AND ( (s1 AND c3) OR (s2 AND c4)  OR (s3 AND c1) ) THEN // no cumulation for short trades
    IF saisonalShortPattern THEN
    SELLSHORT positionSize * shortPositionMultiplier CONTRACT AT MARKET
    ELSE
    SELLSHORT positionSize CONTRACT AT MARKET
    ENDIF
    takeProfit = takeProfitShort
    ENDIF
    
    // stop and profit management
    posProfit = (((close - positionprice) * pointvalue) * countofposition) / pipsize
    
    m1 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithProfit
    m2 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithProfit
    m3 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithoutProfit
    m4 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithoutProfit
    
    IF LONGONMARKET AND (m1 OR m3) THEN
    SELL AT MARKET
    ENDIF
    IF SHORTONMARKET AND (m2 OR m4) THEN
    EXITSHORT AT MARKET
    ENDIF
    
    SET STOP %LOSS stoppLoss
    SET TARGET %PROFIT takeProfit
    
    ENDIF
    

     

    • Nicolas • 244 days ago #

      Do you want me to update the main post ITF file Reiner?

    • Elsborgtrading • 214 days ago #

      Hi Reiner, and good job 🙂 I really like that you works very hard and persistent to optimize and tweak your own code. When I backtest Ver.3 on DAX I see very early you put up 10 positionsize the 22 nov. 2012 and risk around 20% of your account?

      I added this small code

      graph ((tradeprice*stopploss)/100)*positionsize*pointvalue*pipsize/(equity+capital)*100 COLOURED(0,0,0) AS "MAXRISK"//Aqua

       

    • Elsborgtrading • 214 days ago #

      forgot this code as well

      Capital=1000
      equity = Capital + StrategyProfit

       

  48. Reiner • 243 days ago #

    Nicolas, please make an  update. Thanks

    • Nicolas • 243 days ago #

      Your post has been updated with the V3 code and ITF file too.

  49. CKW • 243 days ago #

    Hi Reiner,
    Your v3 Path Finder Performance is excellent! However, i do not have large capital to manage any of the losing trade. so I resized the output by changing the SL% and TP%. Unfortunately, the result is not good as compared to default parameters. Could you please advice what are parameters i need to change in order to maintain the performance?
    br,
    CKW

    • Reiner • 243 days ago #

      Hi CKW, 

      a reduction of risk with the same performance is impossible. You can reduce risk and drawdown when you omit order cumulation and the seasonal pattern booster and increase the take profit limit. Change the following parameters:

      DEFPARAM CUMULATEORDERS = false
      ONCE takeProfitLong = 3.25 ONCE longPositionMultiplier = 1 ONCE shortPositionMultiplier = 1

       

      With these changes Pathfinder is trading only with fixed position size of 1 contract and the drawdown is reduced under 10%. Unfortunately the performance is reduced as well.

      regards

      Reiner

  50. dane • 243 days ago #

    Hi Reiner,

    Crazy performance on this one – great work! Have you tested it with that variable position sizing code you’re using in some of your other algos? If you have the time please consider including it – would be interessting to see the result.

    • Reiner • 243 days ago #

      Hi dane, 

      Yes, I have tested it and it delivers exceptional but results. Pathfinder V3 has some features for variable position sizing and for me it’s enough thrill. But if you have the “balls” for bigger drawdowns here is the code to play around and in Pathfinder Inside you can see an example of smart position sizing.

      https://www.evernote.com/shard/s80/sh/3c8432cd-63f5-4301-a3cb-9a9dd5c8713b/743defcc06fa10ab3a514b9e34fbf76a

      regards

      Reiner

      // 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 parameter
      DEFPARAM CUMULATEORDERS = true  // cumulate orders if not turned off
      DEFPARAM PRELOADBARS = 10000
      
      // trading window 8-22
      ONCE startTime = 80000
      ONCE endTime = 220000
      
      // smoothed average parameter (signalline)
      ONCE periodFirstMA = 5
      ONCE periodSecondMA = 10
      ONCE periodThirdMA = 3
      
      // filter parameter
      ONCE periodLongMA = 250
      ONCE periodShortMA = 50
      
      // trading paramter
      
      // smart position sizing
      Capital = 10000
      Risk = 0.01
      StopCoefficient = 75
      equity = Capital + StrategyProfit
      maxrisk = round(equity * Risk)
      PositionSize = abs(round((maxrisk / StopCoefficient) / PointValue))
      //ONCE PositionSize = 1
      
      // money and position management parameter
      ONCE stoppLoss = 5 // in %
      ONCE takeProfitLong = 3.25 // in %
      ONCE takeProfitShort = 1.75 // in %
      
      ONCE maxCandlesLongWithProfit = 18  // take long profit latest after 18 candles
      ONCE maxCandlesShortWithProfit = 13  // take short profit latest after 13 candles
      ONCE maxCandlesLongWithoutProfit = 30  // limit long loss latest after 30 candles
      ONCE maxCandlesShortWithoutProfit = 25  // limit short loss latest after 25 candles
      
      ONCE startShortPattern = 4 // April
      ONCE endShortPattern = 9   // September
      ONCE longPositionMultiplier = 2  // multiplier for long position size in case of higher saisonal probability
      ONCE shortPositionMultiplier = 2  // multiplier for short position size in case of higher saisonal probability
      
      // calculate daily high/low
      dailyHigh = DHigh(1)
      dailyLow = DLow(1)
      
      // calculate weekly high/low
      If DayOfWeek < DayOfWeek[1] then
      weeklyHigh = Highest[BarIndex - lastWeekBarIndex](dailyHigh)
      lastWeekBarIndex = BarIndex
      ENDIF
      
      // calculate monthly high/low
      If Month <> Month[1] then
      monthlyHigh = Highest[BarIndex - lastMonthBarIndex](dailyHigh)
      monthlyLow = Lowest[BarIndex - lastMonthBarIndex](dailyLow)
      lastMonthBarIndex = BarIndex
      ENDIF
      
      // calculate signalline with multiple smoothed averages
      firstMA = WilderAverage[periodFirstMA](close)
      secondMA = TimeSeriesAverage[periodSecondMA](firstMA)
      signalline = TimeSeriesAverage[periodThirdMA](secondMA)
      
      // trade only in trading window 8-22
      IF Time >= startTime AND Time <= endTime THEN
      
      // filter criteria because not every breakout is profitable
      c1 = close > Average[periodLongMA](close)
      c2 = close < Average[periodLongMA](close)
      c3 = close > Average[periodShortMA](close)
      c4 = close < Average[periodShortMA](close)
      
      // saisonal pattern
      saisonalShortPattern = CurrentMonth >= startShortPattern AND CurrentMonth <= endShortPattern
      
      // long position conditions
      l1 = signalline CROSSES OVER monthlyHigh
      l2 = signalline CROSSES OVER weeklyHigh
      l3 = signalline CROSSES OVER dailyHigh
      l4 = signalline CROSSES OVER monthlyLow
      
      // short position conditions
      s1 = signalline CROSSES UNDER monthlyHigh
      s2 = signalline CROSSES UNDER monthlyLow
      s3 = signalline CROSSES UNDER dailyLow
      
      // long entry
      IF ( l1 OR l4 OR l2 OR (l3 AND c2) ) THEN  // cumulate orders for long trades
      IF not saisonalShortPattern THEN
      BUY PositionSize * longPositionMultiplier CONTRACT AT MARKET
      ELSE
      BUY PositionSize CONTRACT AT MARKET
      ENDIF
      takeProfit = takeProfitLong
      ENDIF
      
      // short entry
      IF NOT SHORTONMARKET  AND ( (s1 AND c3) OR (s2 AND c4)  OR (s3 AND c1) ) THEN // no cumulation for short trades
      IF saisonalShortPattern THEN
      SELLSHORT positionSize * shortPositionMultiplier CONTRACT AT MARKET
      ELSE
      SELLSHORT positionSize CONTRACT AT MARKET
      ENDIF
      takeProfit = takeProfitShort
      ENDIF
      
      // stop and profit management
      posProfit = (((close - positionprice) * pointvalue) * countofposition) / pipsize
      
      m1 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithProfit
      m2 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithProfit
      m3 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithoutProfit
      m4 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithoutProfit
      
      IF LONGONMARKET AND (m1 OR m3) THEN
      SELL AT MARKET
      ENDIF
      IF SHORTONMARKET AND (m2 OR m4) THEN
      EXITSHORT AT MARKET
      ENDIF
      
      SET STOP %LOSS stoppLoss
      SET TARGET %PROFIT takeProfit
      
      ENDIF

       

    • dane • 243 days ago #

      Great, thanks! Yes, the drawdowns indeed increase but they seem to be in relation to the higher gains. As long as you are way past your initial capital it is kind of justified – although easy to say when you’re not dealing with real money 🙂

      Saw that if you enter a smaller amount than roughly 5000 the PositionSize variable will sometimes round down to zero and thus practically end the backtest. For those who wish to test with lower initial capital I added this to the smart position sizing:

      // smart position sizing
      Capital = 2000
      Risk = 0.01
      StopCoefficient = 75
      equity = Capital + StrategyProfit
      maxrisk = round(equity * Risk)
      PositionSize = abs(round((maxrisk / StopCoefficient) / PointValue))
      
      // prevent PositionSize to be zero
      IF PositionSize < 1 THEN
      PositionSize = 1
      ENDIF

       

  51. CKW • 242 days ago #

    Hi Reiner,

    Thanks for your advice.
    I made a small analysis based on the trade (2012 May – 2016 Aug) executed to improve the confident to go on Live. Your “path Finder v3” backtest result is very stable!
    I just launched this strategy on Live Demo account:)

    Few Points:
    #Month of Dec is Perfect!
    #2016 having the best performance so far!
    #Weak Gain on Month on Feb, May but still Good (Which Below <75%)

    Sorry, I don’t have the permission the share the screenshot so i share on this link:

    https://1drv.ms/i/s!Aq8pIkk5CfoblQznPSXXZ7u54wJ-

    br,
    CKW

  52. Matriciel • 241 days ago #

    Hi Reiner,

    Good job, congratulations !!!

  53. mbaker15 • 241 days ago #

    Hey guys, is anybody actually trading this for real?

     

    Mark

  54. OldGerman • 239 days ago #

    Hi Mark,

    I trade the system real with minor changes since 01.08.2016 . It’s a nice addition to my intraday systems .

    Antonius

    • mbaker15 • 238 days ago #

      Hi antonius,

      what changes have you made? And how are you results?

    • OldGerman • 230 days ago #

      Hello mbaker,

      //————————————————-
      // PositionSize long
      ONCE LongSize        = 1 //1  // Optimum = >= 2
      ONCE MaxLongShares   = 3 //3  // Optimum = 3 * LongSize
      //————————————————-
      // PositionSize short
      ONCE ShortSizeSmall  = 0  // Optimum = 0 Size in Winter
      ONCE ShortSizeBig    = 3  // Optimum = MaxLongShares in Summer

      //————————————————-
      // money and position management parameter
      ONCE stoppLosslongProz    = 3        // in %
      ONCE stoppLossshortProz   = 1.75     // in %

      ONCE takeProfitlongProz   = 4        // in %
      ONCE takeProfitshortProz  = 1.95     // in % 

      Backtest-Results in four Years are now with long and short nearly the same.

      Antonius

  55. Michael • 238 days ago #

    Hall Reiner , was passiert wenn ich auf prelaodbars verzichte ?

     

    Beste Grüße

    • Reiner • 238 days ago #

      Hallo Michael,

      Danke für deine Frage und Willkommen.

      ProOrder benötigt für die Berechnung der Indikatoren eine Werte Historie abhängig von den gewählten Parametern. Mit Preloadbars kannst du diese Anzahl einstellen. Pathfinder V3 hat z.B. einen Filter basierend auf einem einfachen gleitenden Durchschnitt mit der Periode 250. Das System benötigt also 250 Kerzen Historie um den korrekten Wert zu berechnen. Lässt du Preloadbars weg und das System benötigt über den Defaultwert hinaus historische Daten liefert ProOrder eine Fehlermeldung. Du kannst den aktuellen Wert von 10.000 reduzieren, aber weglassen würde ich ihn nicht.

      Gruß

      Reiner

  56. flowsen123 • 236 days ago #

    Hey Reiner,

    ich hab versucht den MaxDrawdown zu verringern indem ich für die einzelnen Short und Long conditions (monthly, weekly, daily) verschiedene Take Profit und StopLoss Level definiert habe. Hat leider nicht ganz so gut funktioniert, aber dadurch ist es möglich das Ergebnis marginal zu verbessern und den StopLoss manchmal geringer zu setzen.

    Ich finde es krass wie du die Performance über die verschiedenen Versionen hinweg verbessern konntest. Danke und weiter so!

    Gruß

    Flo

    // 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 parameter
    DEFPARAM CUMULATEORDERS = true  // cumulate orders if not turned off
    DEFPARAM PRELOADBARS = 10000
    
    // trading window 8-22
    ONCE startTime = 80000
    ONCE endTime = 220000
    
    // smoothed average parameter (signalline)
    ONCE periodFirstMA = 5
    ONCE periodSecondMA = 10
    ONCE periodThirdMA = 3
    
    // filter parameter
    ONCE periodLongMA = 250
    ONCE periodShortMA = 50
    
    // trading paramter
    
    // smart position sizing
    
    ONCE PositionSize = 1
    
    // money and position management parameter
    ONCE stoppLossL1 = 3.25 // in %
    ONCE stoppLossL2 = 4.75 // in %
    ONCE stoppLossL3 = 5.5 // in %
    ONCE stoppLossL4 = 4 // in %
    
    ONCE stoppLossS1 = 2 // in %
    ONCE stoppLossS2 = 3 // in %
    ONCE stoppLossS3 = 3 // in %
    
    ONCE takeProfitL1 = 3.5 // in %
    ONCE takeProfitL2 = 3 // in %
    ONCE takeProfitL3 = 4 // in %
    ONCE takeProfitL4 = 4 // in %
    
    ONCE takeProfitS1 = 2 // in %
    ONCE takeProfitS2 = 2 // in %
    ONCE takeProfitS3 = 3  // in %
    
    ONCE maxCandlesLongWithProfit = 18  // take long profit latest after 18 candles
    ONCE maxCandlesShortWithProfit = 13  // take short profit latest after 13 candles
    ONCE maxCandlesLongWithoutProfit = 30  // limit long loss latest after 30 candles
    ONCE maxCandlesShortWithoutProfit = 25  // limit short loss latest after 25 candles
    
    ONCE startShortPattern = 4 // April
    ONCE endShortPattern = 9   // September
    ONCE longPositionMultiplier = 1  // multiplier for long position size in case of higher saisonal probability
    ONCE shortPositionMultiplier = 1  // multiplier for short position size in case of higher saisonal probability
    
    // calculate daily high/low
    dailyHigh = DHigh(1)
    dailyLow = DLow(1)
    
    // calculate weekly high/low
    If DayOfWeek < DayOfWeek[1] then
    weeklyHigh = Highest[BarIndex - lastWeekBarIndex](dailyHigh)
    lastWeekBarIndex = BarIndex
    ENDIF
    
    // calculate monthly high/low
    If Month <> Month[1] then
    monthlyHigh = Highest[BarIndex - lastMonthBarIndex](dailyHigh)
    monthlyLow = Lowest[BarIndex - lastMonthBarIndex](dailyLow)
    lastMonthBarIndex = BarIndex
    ENDIF
    
    // calculate signalline with multiple smoothed averages
    firstMA = WilderAverage[periodFirstMA](close)
    secondMA = TimeSeriesAverage[periodSecondMA](firstMA)
    signalline = TimeSeriesAverage[periodThirdMA](secondMA)
    
    // trade only in trading window 8-22
    IF Time >= startTime AND Time <= endTime THEN
    
    // filter criteria because not every breakout is profitable
    c1 = close > Average[periodLongMA](close)
    c2 = close < Average[periodLongMA](close)
    c3 = close > Average[periodShortMA](close)
    c4 = close < Average[periodShortMA](close)
    
    // saisonal pattern
    saisonalShortPattern = CurrentMonth >= startShortPattern AND CurrentMonth <= endShortPattern
    
    // long position conditions
    l1 = signalline CROSSES OVER monthlyHigh
    l2 = signalline CROSSES OVER weeklyHigh
    l3 = signalline CROSSES OVER dailyHigh
    l4 = signalline CROSSES OVER monthlyLow
    
    // short position conditions
    s1 = signalline CROSSES UNDER monthlyHigh
    s2 = signalline CROSSES UNDER monthlyLow
    s3 = signalline CROSSES UNDER dailyLow
    
    // long entry monthly (L1)
    IF  l1  THEN  // cumulate orders for long trades
    IF not saisonalShortPattern THEN
    BUY PositionSize * longPositionMultiplier CONTRACT AT MARKET
    SET STOP %LOSS stoppLossL1
    SET TARGET %PROFIT takeProfitL1
    ELSE
    BUY PositionSize CONTRACT AT MARKET
    SET STOP %LOSS stoppLossL1
    SET TARGET %PROFIT takeProfitL1
    ENDIF
    ENDIF
    
    // long entry weekly (L2)
    IF  l2  THEN  // cumulate orders for long trades
    IF not saisonalShortPattern THEN
    BUY PositionSize * longPositionMultiplier CONTRACT AT MARKET
    SET STOP %LOSS stoppLossL2
    SET TARGET %PROFIT takeProfitL2
    ELSE
    BUY PositionSize CONTRACT AT MARKET
    SET STOP %LOSS stoppLossL2
    SET TARGET %PROFIT takeProfitL2
    ENDIF
    ENDIF
    
    // long entry dayly (L3)
    IF l3 AND c2 THEN  // cumulate orders for long trades
    IF not saisonalShortPattern THEN
    BUY PositionSize * longPositionMultiplier CONTRACT AT MARKET
    SET STOP %LOSS stoppLossL3
    SET TARGET %PROFIT takeProfitL3
    ELSE
    BUY PositionSize CONTRACT AT MARKET
    SET STOP %LOSS stoppLossL3
    SET TARGET %PROFIT takeProfitL3
    ENDIF
    ENDIF
    
    // long entry monthly low (L4)
    IF  l4  THEN  // cumulate orders for long trades
    IF not saisonalShortPattern THEN
    BUY PositionSize * longPositionMultiplier CONTRACT AT MARKET
    SET STOP %LOSS stoppLossL4
    SET TARGET %PROFIT takeProfitL4
    ELSE
    BUY PositionSize CONTRACT AT MARKET
    SET STOP %LOSS stoppLossL4
    SET TARGET %PROFIT takeProfitL4
    ENDIF
    ENDIF
    
    // short entry (S1)
    IF NOT SHORTONMARKET  AND s1 AND c3 THEN // no cumulation for short trades
    IF saisonalShortPattern THEN
    SELLSHORT positionSize * shortPositionMultiplier CONTRACT AT MARKET
    SET STOP %LOSS stoppLossS1
    SET TARGET %PROFIT takeProfitS1
    ELSE
    SELLSHORT positionSize CONTRACT AT MARKET
    SET STOP %LOSS stoppLossS1
    SET TARGET %PROFIT takeProfitS1
    ENDIF
    ENDIF
    
    // short entry (S2)
    IF NOT SHORTONMARKET  AND s2 AND c4 THEN // no cumulation for short trades
    IF saisonalShortPattern THEN
    SELLSHORT positionSize * shortPositionMultiplier CONTRACT AT MARKET
    SET STOP %LOSS stoppLossS2
    SET TARGET %PROFIT takeProfitS2
    ELSE
    SELLSHORT positionSize CONTRACT AT MARKET
    SET STOP %LOSS stoppLossS2
    SET TARGET %PROFIT takeProfitS2
    ENDIF
    ENDIF
    
    // short entry (S3)
    IF NOT SHORTONMARKET  AND s3 AND c1 THEN // no cumulation for short trades
    IF saisonalShortPattern THEN
    SELLSHORT positionSize * shortPositionMultiplier CONTRACT AT MARKET
    SET STOP %LOSS stoppLossS3
    SET TARGET %PROFIT takeProfitS3
    ELSE
    SELLSHORT positionSize CONTRACT AT MARKET
    SET STOP %LOSS stoppLossS3
    SET TARGET %PROFIT takeProfitS3
    ENDIF
    ENDIF
    
    // stop and profit management
    posProfit = (((close - positionprice) * pointvalue) * countofposition) / pipsize
    
    m1 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithProfit
    m2 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithProfit
    m3 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithoutProfit
    m4 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithoutProfit
    
    IF LONGONMARKET AND (m1 OR m3) THEN
    SELL AT MARKET
    ENDIF
    IF SHORTONMARKET AND (m2 OR m4) THEN
    EXITSHORT AT MARKET
    ENDIF
    
    
    ENDIF
    

     

    • Reiner • 236 days ago #

      Flo, Danke für deinen Beitrag. Die Idee ist nicht schlecht, ich hatte etwas ähnliches getestet. Die Ergebnisse waren aber nicht so viel besser, dass sich die zusätzliche Komplexität rechtfertig.

  57. flowsen123 • 236 days ago #

    sorry, war nicht das aktuellste

     

    // 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 parameter
    DEFPARAM CUMULATEORDERS = true  // cumulate orders if not turned off
    DEFPARAM PRELOADBARS = 10000
    
    // trading window 8-22
    ONCE startTime = 80000
    ONCE endTime = 220000
    
    // smoothed average parameter (signalline)
    ONCE periodFirstMA = 5
    ONCE periodSecondMA = 10
    ONCE periodThirdMA = 3
    
    // filter parameter
    ONCE periodLongMA = 250
    ONCE periodShortMA = 50
    
    // trading paramter
    
    // smart position sizing
    
    ONCE PositionSize = 1
    
    // money and position management parameter
    ONCE stoppLossL1 = 3.25 // in %
    ONCE stoppLossL2 = 4.75 // in %
    ONCE stoppLossL3 = 5.5 // in %
    ONCE stoppLossL4 = 4 // in %
    
    ONCE stoppLossS1 = 2 // in %
    ONCE stoppLossS2 = 3 // in %
    ONCE stoppLossS3 = 3 // in %
    
    ONCE takeProfitL1 = 3.5 // in %
    ONCE takeProfitL2 = 3 // in %
    ONCE takeProfitL3 = 4 // in %
    ONCE takeProfitL4 = 4 // in %
    
    ONCE takeProfitS1 = 3.5 // in %
    ONCE takeProfitS2 = 1.15 // in %
    ONCE takeProfitS3 = 1.75  // in %
    
    ONCE maxCandlesLongWithProfit = 20  // take long profit latest after 18 candles
    ONCE maxCandlesShortWithProfit = 13  // take short profit latest after 13 candles
    ONCE maxCandlesLongWithoutProfit = 30  // limit long loss latest after 30 candles
    ONCE maxCandlesShortWithoutProfit = 25  // limit short loss latest after 25 candles
    
    ONCE startShortPattern = 4 // April
    ONCE endShortPattern = 9   // September
    ONCE longPositionMultiplier = 1  // multiplier for long position size in case of higher saisonal probability
    ONCE shortPositionMultiplier = 1  // multiplier for short position size in case of higher saisonal probability
    
    // calculate daily high/low
    dailyHigh = DHigh(1)
    dailyLow = DLow(1)
    
    // calculate weekly high/low
    If DayOfWeek < DayOfWeek[1] then
    weeklyHigh = Highest[BarIndex - lastWeekBarIndex](dailyHigh)
    lastWeekBarIndex = BarIndex
    ENDIF
    
    // calculate monthly high/low
    If Month <> Month[1] then
    monthlyHigh = Highest[BarIndex - lastMonthBarIndex](dailyHigh)
    monthlyLow = Lowest[BarIndex - lastMonthBarIndex](dailyLow)
    lastMonthBarIndex = BarIndex
    ENDIF
    
    // calculate signalline with multiple smoothed averages
    firstMA = WilderAverage[periodFirstMA](close)
    secondMA = TimeSeriesAverage[periodSecondMA](firstMA)
    signalline = TimeSeriesAverage[periodThirdMA](secondMA)
    
    // trade only in trading window 8-22
    IF Time >= startTime AND Time <= endTime THEN
    
    // filter criteria because not every breakout is profitable
    c1 = close > Average[periodLongMA](close)
    c2 = close < Average[periodLongMA](close)
    c3 = close > Average[periodShortMA](close)
    c4 = close < Average[periodShortMA](close)
    
    // saisonal pattern
    saisonalShortPattern = CurrentMonth >= startShortPattern AND CurrentMonth <= endShortPattern
    
    // long position conditions
    l1 = signalline CROSSES OVER monthlyHigh
    l2 = signalline CROSSES OVER weeklyHigh
    l3 = signalline CROSSES OVER dailyHigh
    l4 = signalline CROSSES OVER monthlyLow
    
    // short position conditions
    s1 = signalline CROSSES UNDER monthlyHigh
    s2 = signalline CROSSES UNDER monthlyLow
    s3 = signalline CROSSES UNDER dailyLow
    
    // long entry monthly (L1)
    IF  l1  THEN  // cumulate orders for long trades
    IF not saisonalShortPattern THEN
    BUY PositionSize * longPositionMultiplier CONTRACT AT MARKET
    SET STOP %LOSS stoppLossL1
    SET TARGET %PROFIT takeProfitL1
    ELSE
    BUY PositionSize CONTRACT AT MARKET
    SET STOP %LOSS stoppLossL1
    SET TARGET %PROFIT takeProfitL1
    ENDIF
    ENDIF
    
    // long entry weekly (L2)
    IF  l2  THEN  // cumulate orders for long trades
    IF not saisonalShortPattern THEN
    BUY PositionSize * longPositionMultiplier CONTRACT AT MARKET
    SET STOP %LOSS stoppLossL2
    SET TARGET %PROFIT takeProfitL2
    ELSE
    BUY PositionSize CONTRACT AT MARKET
    SET STOP %LOSS stoppLossL2
    SET TARGET %PROFIT takeProfitL2
    ENDIF
    ENDIF
    
    // long entry dayly (L3)
    IF l3 AND c2 THEN  // cumulate orders for long trades
    IF not saisonalShortPattern THEN
    BUY PositionSize * longPositionMultiplier CONTRACT AT MARKET
    SET STOP %LOSS stoppLossL3
    SET TARGET %PROFIT takeProfitL3
    ELSE
    BUY PositionSize CONTRACT AT MARKET
    SET STOP %LOSS stoppLossL3
    SET TARGET %PROFIT takeProfitL3
    ENDIF
    ENDIF
    
    // long entry monthly low (L4)
    IF  l4  THEN  // cumulate orders for long trades
    IF not saisonalShortPattern THEN
    BUY PositionSize * longPositionMultiplier CONTRACT AT MARKET
    SET STOP %LOSS stoppLossL4
    SET TARGET %PROFIT takeProfitL4
    ELSE
    BUY PositionSize CONTRACT AT MARKET
    SET STOP %LOSS stoppLossL4
    SET TARGET %PROFIT takeProfitL4
    ENDIF
    ENDIF
    
    // short entry (S1)
    IF NOT SHORTONMARKET  AND s1 AND c3 THEN // no cumulation for short trades
    IF saisonalShortPattern THEN
    SELLSHORT positionSize * shortPositionMultiplier CONTRACT AT MARKET
    SET STOP %LOSS stoppLossS1
    SET TARGET %PROFIT takeProfitS1
    ELSE
    SELLSHORT positionSize CONTRACT AT MARKET
    SET STOP %LOSS stoppLossS1
    SET TARGET %PROFIT takeProfitS1
    ENDIF
    ENDIF
    
    // short entry (S2)
    IF NOT SHORTONMARKET  AND s2 AND c4 THEN // no cumulation for short trades
    IF saisonalShortPattern THEN
    SELLSHORT positionSize * shortPositionMultiplier CONTRACT AT MARKET
    SET STOP %LOSS stoppLossS2
    SET TARGET %PROFIT takeProfitS2
    ELSE
    SELLSHORT positionSize CONTRACT AT MARKET
    SET STOP %LOSS stoppLossS2
    SET TARGET %PROFIT takeProfitS2
    ENDIF
    ENDIF
    
    // short entry (S3)
    IF NOT SHORTONMARKET  AND s3 AND c1 THEN // no cumulation for short trades
    IF saisonalShortPattern THEN
    SELLSHORT positionSize * shortPositionMultiplier CONTRACT AT MARKET
    SET STOP %LOSS stoppLossS3
    SET TARGET %PROFIT takeProfitS3
    ELSE
    SELLSHORT positionSize CONTRACT AT MARKET
    SET STOP %LOSS stoppLossS3
    SET TARGET %PROFIT takeProfitS3
    ENDIF
    ENDIF
    
    // stop and profit management
    posProfit = (((close - positionprice) * pointvalue) * countofposition) / pipsize
    
    m1 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithProfit
    m2 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithProfit
    m3 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithoutProfit
    m4 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithoutProfit
    
    IF LONGONMARKET AND (m1 OR m3) THEN
    SELL AT MARKET
    ENDIF
    IF SHORTONMARKET AND (m2 OR m4) THEN
    EXITSHORT AT MARKET
    ENDIF
    
    
    ENDIF
    

     

  58. Michael • 236 days ago #

    Reiner , das bedeutet 10.000 Kerzen (4h Bar) , dann muss ja eine Ewigkeit warten ehe das System startet ?

    • Reiner • 236 days ago #

      das System startet immer ab dem Moment, ab dem du es aktivierst. preloadbars steuert die Anzahl Kerzen die ab dem aktuellen Zeitpunkt historisch!!! geladen werden sollen um deine Algo Parameter zu berechnen – das sind bei dem dem aktuellen Setup mindestens 250 Kerzen. preloadbars hat je nach PRT Instanz einen Standardwert, der liegt für die deutsche Instanz m.E. bei 2000 Kerzen. Pathfinder wird also mit dem Defaultwert funktionieren wenn du preloadbars weglässt. Da es aber immer wieder Probleme mit anderen Länderinstanzen und ProOrder gibt habe ich bewusst einen hohen Wert ghewählt.

  59. pep17 • 230 days ago #

    hi firstly say thanks to the creator, im just new into prorealtime and I’m really enjoying it, its a great platform.

    Im checking your automated system and I realised 2 hour bars is the best for backtest, are you testint it on real account or anyone is doing it, or real time? cuz i cant really imagine that working like this in real, but it’ll be great. 

    If you check backtest you can se that the first month of the year are the worst of the backtest.

     

    • Reiner • 230 days ago #

      Hi pep17,

      Thanks for your comment and welcome. Pathfinder was created original for H4. The shown backtest is of course an optimized view to historic data. The results are promising but Pathfinder must prove that it works in real mode. I’m trading V2 since mid of July and I can confirm that the results are like the backtest. I’m now switched to V3.

      reagrds

      Reiner

  60. Fran • 230 days ago #

     Hello Reiner,

    thank you for sharing your strategy, it seems to be awesome, and I would like to test it in real environment. I will do with Mini DAX 1Eur (CFDs), and spread is differente at IG Spain than yours I think, 1 point from 9 to 17:30 and 2 from 8 to 9 and from 17:30 to 22:00. I supose that this is not a problem for the calculations, isn’t it?

    And about the automatic trading preferences, is there something to consider? For example, maximun number of orders per day that could be launched? maximun position size? Close for maximun X orders in queue?

     

    Thank you again,

    Regards,

    Fran

     

    • Reiner • 230 days ago #

      Hi Fran,

      Thanks for your comment and welcome. The spreads you mentioned in your post are the same condition like here in Germany. The backtest was calculated with 2 point spread from 8-22. Please consider that Pathfinder works with cumulative and variable order sizes when you start Pathfinder and ProOrder is asking after the max position size set a higher value then 1 also if you have set positionSize to 1 in Pathfinder’s code. When you don’t like this behavior you can omit order cumulation and the seasonal pattern booster when you change the following parameters:

      DEFPARAM CUMULATEORDERS = false
      ONCE longPositionMultiplier = 1
      ONCE shortPositionMultiplier = 1
      

      With these changes Pathfinder is trading only with fixed position size of 1 contract.

      Max Orders per day depends on your number of running trading systems. Pathfinder usually trades not very often intraday.

      regards

      Reiner

  61. Fran • 230 days ago #

    The system has just open a long at 10.719 at 13:00h

  62. Fran • 230 days ago #

    thank you for your comments Rainer. Is it normal the behavior about this early begining? I have uploaded the strategy at prorealtime at 12:35 h and 25 minutes later it has just beging to open a position.

    • Reiner • 230 days ago #

      the system is aktiv immediately after start, Pathfinder in H4 checks every start of 9:00, 13:00, 17:00 and 21:00 candle the trading conditions

  63. Cosmic1 • 229 days ago #

    Great bit of code this. I can see you have put a lot of thought in to it. Doesn’t seem to work before 2009 for some reason. I used an IN/OUT sample from Jan 2009 until May 2014, optimising the stoploss, takeprofitlong, takeprofit short. I used 0.5 – 5 with 0.25 increments. This still works well going forward to today’s date so seems to stand up 🙂 I’m considering running stopploss 3, takeprofitlong 5, takeprofitshort 3.5. I think the next IN/OUT sample test should be the candle lengths perhaps? 

    @Nicolas Can’t seem to attach my opp excel spreadsheet?

    • Reiner • 229 days ago #

      Hi Cosmic,

      Thanks for your comment. Regarding performance before 2009 Doctrading made the remark that on ProRealTime CFD, the DAX had no quote / price before August 2010.

      regards

      Reiner

  64. flowsen123 • 228 days ago #

    Hey Reiner,

    there are 4h candles since March 2006. But before August 2010 there are no prices for the time between 22:00 and 08:00. If you need the list of orders for the complete periode, just let me know and I will send you the excel file.

    Is it possible to open a trade as soon as I start the system, even though there is no new position? Because I would like to wait for a trade to be negative and then start the system. So if the worst drawdown is e.g. 1.500€, I would wait for a 500€ drawdown and then start the system with a capital of 2.000, to be save.

    Thanks

    Flo

    • Reiner • 228 days ago #

      Flo, thanks for your offer but for me the current backtest results are sufficient. As I understand you right you want to wait for a first virtual looser before you start real trading. I think that is possible to realize but in my opinion not a good approach. With 80% profitable trades you will miss a lot of good possibilities before you start trading. Pathfinders drawdown is around 15-17% and I recommend a trading budget of at least 5.000 Euro.

  65. Reiner • 228 days ago #

    I have tested Pathfinder with other popular indices. Due every index has it’s own “heartbeat” minor adjustments were necessary. Here are the results for FTSE, EU Stocks 50 and CAC. Please be aware that this is an optimized view to historic data. Please find more details in Pathfinder Inside.

    https://www.evernote.com/shard/s80/sh/3c8432cd-63f5-4301-a3cb-9a9dd5c8713b/743defcc06fa10ab3a514b9e34fbf76a

    Here is the code for the FTSE:

    // Pathfinder FTSE 4H, 9-22, 2 points spread
    // FTSE breakout system triggered by previous daily, weekly and monthly high/low crossings
    // Version 3
    
    // ProOrder code parameter
    DEFPARAM CUMULATEORDERS = true  // cumulate orders if not turned off
    DEFPARAM PRELOADBARS = 10000
    
    // trading window 9-22
    ONCE startTime = 90000
    ONCE endTime = 220000
    
    // smoothed average parameter (signalline)
    ONCE periodFirstMA = 5
    ONCE periodSecondMA = 10
    ONCE periodThirdMA = 7
    
    // filter parameter
    ONCE periodLongMA = 200
    ONCE periodShortMA = 40
    
    // trading paramter
    ONCE PositionSize = 1
    
    // money and position management parameter
    ONCE stoppLoss = 5 // in %
    ONCE takeProfitLong = 3 // in %
    ONCE takeProfitShort = 2.25 // in %
    
    ONCE maxCandlesLongWithProfit = 25  // take long profit latest after 25 candles
    ONCE maxCandlesShortWithProfit = 13  // take short profit latest after 13 candles
    ONCE maxCandlesLongWithoutProfit = 40  // limit long loss latest after 30 candles
    ONCE maxCandlesShortWithoutProfit = 25  // limit short loss latest after 25 candles
    
    ONCE startShortPattern = 8 // August
    ONCE endShortPattern = 9   // September
    ONCE longPositionMultiplier = 2  // multiplier for long position size in case of higher saisonal probability
    ONCE shortPositionMultiplier = 2  // multiplier for short position size in case of higher saisonal probability
    
    // calculate daily high/low
    dailyHigh = DHigh(1)
    dailyLow = DLow(1)
    
    // calculate weekly high/low
    If DayOfWeek < DayOfWeek[1] then
    weeklyHigh = Highest[BarIndex - lastWeekBarIndex](dailyHigh)
    lastWeekBarIndex = BarIndex
    ENDIF
    
    // calculate monthly high/low
    If Month <> Month[1] then
    monthlyHigh = Highest[BarIndex - lastMonthBarIndex](dailyHigh)
    monthlyLow = Lowest[BarIndex - lastMonthBarIndex](dailyLow)
    lastMonthBarIndex = BarIndex
    ENDIF
    
    // calculate signalline with multiple smoothed averages
    firstMA = WilderAverage[periodFirstMA](close)
    secondMA = TimeSeriesAverage[periodSecondMA](firstMA)
    signalline = TimeSeriesAverage[periodThirdMA](secondMA)
    
    // trade only in trading window 9-22
    IF Time >= startTime AND Time <= endTime THEN
    
    // filter criteria because not every breakout is profitable
    c1 = close > Average[periodLongMA](close)
    c2 = close < Average[periodLongMA](close)
    c3 = close > Average[periodShortMA](close)
    
    // saisonal pattern
    saisonalShortPattern = CurrentMonth >= startShortPattern AND CurrentMonth <= endShortPattern
    
    // long position conditions
    l1 = signalline CROSSES OVER monthlyHigh
    l2 = signalline CROSSES OVER weeklyHigh
    l3 = signalline CROSSES OVER dailyHigh
    l4 = signalline CROSSES OVER monthlyLow
    
    // short position conditions
    s1 = signalline CROSSES UNDER monthlyHigh
    s2 = signalline CROSSES UNDER dailyLow
    
    // long entry
    IF ( l1 OR l4 OR l2 OR (l3 AND c2) ) THEN  // cumulate orders for long trades
    IF not saisonalShortPattern THEN
    BUY PositionSize * longPositionMultiplier CONTRACT AT MARKET
    ELSE
    BUY PositionSize CONTRACT AT MARKET
    ENDIF
    takeProfit = takeProfitLong
    ENDIF
    
    // short entry
    // (s2 AND c1) deliver better results
    IF NOT SHORTONMARKET  AND ( (s1 AND c3) OR (s2 AND c1) ) THEN // no cumulation for short trades
    IF saisonalShortPattern THEN
    SELLSHORT positionSize * shortPositionMultiplier CONTRACT AT MARKET
    ELSE
    SELLSHORT positionSize CONTRACT AT MARKET
    ENDIF
    takeProfit = takeProfitShort
    ENDIF
    
    // stop and profit management
    posProfit = (((close - positionprice) * pointvalue) * countofposition) / pipsize
    
    m1 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithProfit
    m2 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithProfit
    m3 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithoutProfit
    m4 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithoutProfit
    
    IF LONGONMARKET AND (m1 OR m3) THEN
    SELL AT MARKET
    ENDIF
    IF SHORTONMARKET AND (m2 OR m4) THEN
    EXITSHORT AT MARKET
    ENDIF
    
    SET STOP %LOSS stoppLoss
    SET TARGET %PROFIT takeProfit
    
    ENDIF

     

  66. miguel33 • 227 days ago #

    Reiner ,

    your contribution is formidable. thank you.

  67. Fran • 227 days ago #

     Hello Reiner,

    Since the strategy had begun, it has passed 18 candlesticks and with a little profit (diference only of +16 points at 13:00h) and I supose that for the code the condition called m1 it should have made that the position close, but it continues open.

    What should it be wrong?

    Thank you!!!!!!

    • Reiner • 227 days ago #

      Fran, today at 13:00 we had 17 candles, so no reason to trade. At 17:00 we had 18 candles but close was under 10720 (loss) and the system will stay now until 30 candles or one of the other conditions are reached

  68. miguel33 • 225 days ago #

    Ciao Reiner

    As you have optimized for the DJ ?

    for the FTSE 100 has the best ratio with  5 % 3 % 1.75%  ratio is 6,13

    grazie.

     

    • Reiner • 225 days ago #

      Salve Miguel, Dow backtest also looks very promising. tanti saluti Reiner

      Please find more details in Pathfinder Inside. 

      https://www.evernote.com/shard/s80/sh/3c8432cd-63f5-4301-a3cb-9a9dd5c8713b/743defcc06fa10ab3a514b9e34fbf76a

      Here is the code for the DJ:

      // Pathfinder DOW 4H, 8-22, 2.8 points spread
      // DAX breakout system triggered by previous daily, weekly and monthly high/low crossings
      // Version 3
      
      // ProOrder code parameter
      DEFPARAM CUMULATEORDERS = true  // cumulate orders if not turned off
      DEFPARAM PRELOADBARS = 10000
      
      // trading window 8-22
      ONCE startTime = 080000
      ONCE endTime = 220000
      
      // smoothed average parameter (signalline)
      ONCE periodFirstMA = 5
      ONCE periodSecondMA = 10
      ONCE periodThirdMA = 7
      
      // filter parameter
      ONCE periodLongMA = 300
      ONCE periodShortMA = 10
      
      // trading paramter
      ONCE PositionSize = 1
      
      // money and position management parameter
      ONCE stoppLossLong = 5.5 // in %
      ONCE stoppLossShort = 2.75 // in %
      ONCE takeProfitLong = 2.75 // in %
      ONCE takeProfitShort = 1.75 // in %
      
      ONCE maxCandlesLongWithProfit = 17  // take long profit latest after 17 candles
      ONCE maxCandlesShortWithProfit = 13  // take short profit latest after 13 candles
      ONCE maxCandlesLongWithoutProfit = 40  // limit long loss latest after 40 candles
      ONCE maxCandlesShortWithoutProfit = 25  // limit short loss latest after 25 candles
      
      ONCE startShortPattern = 8 // August
      ONCE endShortPattern = 9   // September
      ONCE longPositionMultiplier = 2  // multiplier for long position size in case of higher saisonal probability
      ONCE shortPositionMultiplier = 2  // multiplier for short position size in case of higher saisonal probability
      
      // calculate daily high/low
      dailyHigh = DHigh(1)
      dailyLow = DLow(1)
      
      // calculate weekly high/low
      If DayOfWeek < DayOfWeek[1] then
      weeklyHigh = Highest[BarIndex - lastWeekBarIndex](dailyHigh)
      lastWeekBarIndex = BarIndex
      ENDIF
      
      // calculate monthly high/low
      If Month <> Month[1] then
      monthlyHigh = Highest[BarIndex - lastMonthBarIndex](dailyHigh)
      monthlyLow = Lowest[BarIndex - lastMonthBarIndex](dailyLow)
      lastMonthBarIndex = BarIndex
      ENDIF
      
      // calculate signalline with multiple smoothed averages
      firstMA = WilderAverage[periodFirstMA](close)
      secondMA = TimeSeriesAverage[periodSecondMA](firstMA)
      signalline = TimeSeriesAverage[periodThirdMA](secondMA)
      
      // trade only in trading window 8-22
      IF Time >= startTime AND Time <= endTime THEN
      
      // filter criteria because not every breakout is profitable
      c1 = close > Average[periodLongMA](close)
      c2 = close < Average[periodLongMA](close)
      c3 = close > Average[periodShortMA](close)
      
      // saisonal pattern
      saisonalShortPattern = CurrentMonth >= startShortPattern AND CurrentMonth <= endShortPattern
      
      // long position conditions
      l1 = signalline CROSSES OVER monthlyHigh
      l2 = signalline CROSSES OVER weeklyHigh
      l3 = signalline CROSSES OVER dailyHigh
      l4 = signalline CROSSES OVER monthlyLow
      
      // short position conditions
      s1 = signalline CROSSES UNDER monthlyHigh
      s2 = signalline CROSSES UNDER dailyLow
      
      // long entry
      IF ( l1 OR l4 OR l2 OR (l3 AND c2) ) THEN  // cumulate orders for long trades
      IF not saisonalShortPattern THEN
      BUY PositionSize * longPositionMultiplier CONTRACT AT MARKET
      ELSE
      BUY PositionSize CONTRACT AT MARKET
      ENDIF
      stoppLoss = stoppLossLong
      takeProfit = takeProfitLong
      ENDIF
      
      // short entry
      IF NOT SHORTONMARKET  AND ( (s1 AND c3) OR (s2 AND c1) ) THEN // no cumulation for short trades
      IF saisonalShortPattern THEN
      SELLSHORT positionSize * shortPositionMultiplier CONTRACT AT MARKET
      ELSE
      SELLSHORT positionSize CONTRACT AT MARKET
      ENDIF
      stoppLoss = stoppLossShort
      takeProfit = takeProfitShort
      ENDIF
      
      // stop and profit management
      posProfit = (((close - positionprice) * pointvalue) * countofposition) / pipsize
      
      m1 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithProfit
      m2 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithProfit
      m3 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithoutProfit
      m4 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithoutProfit
      
      IF LONGONMARKET AND (m1 OR m3) THEN
      SELL AT MARKET
      ENDIF
      IF SHORTONMARKET AND (m2 OR m4) THEN
      EXITSHORT AT MARKET
      ENDIF
      
      SET STOP %LOSS stoppLoss
      SET TARGET %PROFIT takeProfit
      
      ENDIF

       

  69. Fran • 225 days ago #

    Hello Reiner, If I count candlesticks well next monday at 9:00 the system is going to close my position with a lot of loss -300 points- 30 candlesticks since last monday at 13:00h. If I close the system before 9:00 the position will be open for more time and may be I will decide to do it. If I do that before 9:00, and I launch the system again at the same time before 9:00h, will it be problem for your system?

    Thank you 

    • Reiner • 225 days ago #

      Hi Fran, last DAX trade will be unfortunately a looser. Triggered by cross over of weekly high Pathfinder goes long at 10720 but DAX buyers had not enough power to move it over the resistance around 10750 – 10775 and then the DAX followed a very weak Dow on Friday evening. The position will closed with a loss latest after 30 candles. What happens with the position when you stop the system depends on your trading option settings. By default the position will be closed immediately after stopping the system.

  70. miguel33 • 225 days ago #

    IL sistema ha grandi possibilità visto in backtest . Pertanto se si dispone di buoni capitali si può impostare e “lasciare fare” . A mio avviso è utile essere attenti a bloccare il sistema quando sono in programma eventi straordinari (bce , FED o attentati ecc) che fanno salire volatilità e condizionano molto la direzione del trade. Pertanto stoppare subito potrebbe diminuire o annullare un loss alto. Infatti nel trade ultimo mentre Draghi parlava vista la direzione intrapresa ho stoppata con un loss di soli 22,00 € . Ovviamente questa è una mia idea .

     

    the system has great possibilities seen in backtest. So if you have good capital you can be set up and “let it do.” I think it is useful to be careful to lock the system when they are extraordinary events program (ECB, FED, or attacks etc) which drive up volatility and very affect the direction of trade. Therefore stop immediately may decrease or cancel a high loss. In fact in the last trade as Draghi spoke given the direction taken I stopped out with a loss of only € 22.00. Obviously this is my idea.

  71. Emil • 225 days ago #

    On FTSE there are some 0 bars. Wondering if there are any adjustments to be made

    • Reiner • 223 days ago #

      Hi Emil,

      Thanks for your comment and welcome. Yes ,there are some zero bars but 3% for long and 2.25% for short trades should reduce the backtest fake risk. Due I’m not a FTSE expert feel free to make it better.

      regards

      Reiner

  72. wp01 • 223 days ago #

    Dear Reiner,

     

    I’d like to thank you for sharing your system. It look great!

    When you have the time can you please check if you can adapt this for the AEX?

    Thanks in advance.

     

    Regards,

    Patrick

     

     

     

    • Reiner • 222 days ago #

      Hi Patrik,

      Thanks for your comment and welcome. As requested here is a Pathfinder version optimized for the AEX mini. The result is awesome but have an eye to the drawdown, you realy need some “balls” to trade this. I  suggest to reduce the risk and omit the saisonal pattern booster. I’m not an AEX expert and this code is optimized may be curve fitted so please play around and test it in demo accound before you start trade this in real.

      Please find backtest details in Pathfinder Inside. 

      https://www.evernote.com/shard/s80/sh/3c8432cd-63f5-4301-a3cb-9a9dd5c8713b/743defcc06fa10ab3a514b9e34fbf76a

      Here is the code for the AEX:

      // Pathfinder AEX 4H, 8-22, 0.3 points spread
      // AEX breakout system triggered by previous daily, weekly and monthly high/low crossings
      // Version 4
      
      // ProOrder code parameter
      DEFPARAM CUMULATEORDERS = true  // cumulate orders if not turned off
      DEFPARAM PRELOADBARS = 10000
      
      // trading window 8-22
      ONCE startTime = 80000
      ONCE endTime = 220000
      
      // smoothed average parameter (signalline)
      ONCE periodFirstMA = 5
      ONCE periodSecondMA = 10
      ONCE periodThirdMA = 3
      
      // filter parameter
      ONCE periodLongMA = 170
      ONCE periodShortMA = 10
      
      // trading paramter
      ONCE PositionSize = 1
      
      // money and position management parameter
      ONCE stoppLossLong = 5 // in %
      ONCE stoppLossShort = 3.5 // in %
      ONCE takeProfitLong = 3 // in %
      ONCE takeProfitShort = 1.25 // in %
      
      ONCE maxCandlesLongWithProfit = 28  // take long profit latest after 18 candles
      ONCE maxCandlesShortWithProfit = 13  // take short profit latest after 13 candles
      ONCE maxCandlesLongWithoutProfit = 40  // limit long loss latest after 30 candles
      ONCE maxCandlesShortWithoutProfit = 25  // limit short loss latest after 25 candles
      
      ONCE startShortPattern = 8 // May
      ONCE endShortPattern = 9   // September
      ONCE longPositionMultiplier = 2  // multiplier for long position size in case of higher saisonal probability
      ONCE shortPositionMultiplier = 2  // multiplier for short position size in case of higher saisonal probability
      
      // calculate daily high/low
      dailyHigh = DHigh(1)
      dailyLow = DLow(1)
      
      // calculate weekly high/low
      If DayOfWeek < DayOfWeek[1] then
      weeklyHigh = Highest[BarIndex - lastWeekBarIndex](dailyHigh)
      lastWeekBarIndex = BarIndex
      ENDIF
      
      // calculate monthly high/low
      If Month <> Month[1] then
      monthlyHigh = Highest[BarIndex - lastMonthBarIndex](dailyHigh)
      monthlyLow = Lowest[BarIndex - lastMonthBarIndex](dailyLow)
      lastMonthBarIndex = BarIndex
      ENDIF
      
      // calculate signalline with multiple smoothed averages
      firstMA = WilderAverage[periodFirstMA](close)
      secondMA = TimeSeriesAverage[periodSecondMA](firstMA)
      signalline = TimeSeriesAverage[periodThirdMA](secondMA)
      
      // trade only in trading window 8-22
      IF Time >= startTime AND Time <= endTime THEN
      
      // filter criteria because not every breakout is profitable
      c1 = close > Average[periodLongMA](close)
      c2 = close < Average[periodLongMA](close)
      c3 = close > Average[periodShortMA](close)
      
      // saisonal pattern
      saisonalShortPattern = CurrentMonth >= startShortPattern AND CurrentMonth <= endShortPattern
      
      // long position conditions
      l1 = signalline CROSSES OVER monthlyHigh
      l2 = signalline CROSSES OVER weeklyHigh
      l3 = signalline CROSSES OVER dailyHigh
      l4 = signalline CROSSES OVER monthlyLow
      
      // short position conditions
      s1 = signalline CROSSES UNDER monthlyHigh
      s2 = signalline CROSSES UNDER dailyLow
      
      // long entry
      IF ( l1 OR l4 OR l2 OR (l3 AND c2) ) THEN  // cumulate orders for long trades
      IF not saisonalShortPattern THEN
      BUY PositionSize * longPositionMultiplier CONTRACT AT MARKET
      ELSE
      BUY PositionSize CONTRACT AT MARKET
      ENDIF
      stoppLoss = stoppLossLong
      takeProfit = takeProfitLong
      ENDIF
      
      // short entry
      IF NOT SHORTONMARKET  AND ( (s1 AND c3) OR (s2 AND c1) ) THEN // no cumulation for short trades
      IF saisonalShortPattern THEN
      SELLSHORT positionSize * shortPositionMultiplier CONTRACT AT MARKET
      ELSE
      SELLSHORT positionSize CONTRACT AT MARKET
      ENDIF
      stoppLoss = stoppLossShort
      takeProfit = takeProfitShort
      ENDIF
      
      // stop and profit management
      posProfit = (((close - positionprice) * pointvalue) * countofposition) / pipsize
      
      m1 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithProfit
      m2 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithProfit
      m3 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithoutProfit
      m4 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithoutProfit
      
      IF LONGONMARKET AND (m1 OR m3) THEN
      SELL AT MARKET
      ENDIF
      IF SHORTONMARKET AND (m2 OR m4) THEN
      EXITSHORT AT MARKET
      ENDIF
      
      SET STOP %LOSS stoppLoss
      SET TARGET %PROFIT takeProfit
      
      ENDIF
      

       

  73. wp01 • 222 days ago #

    Dear Reiner,

    Thank you very much for the adjusted code. I will look into your suggestions regarding the

    drawdown and the booster.

    Thanks again.

     

    kind  regards,

    Patrick

     

  74. Wisko • 220 days ago #

    Hallo Reiner,

    ersteinmal danke für das Teilen des Codes.

    Ich habe ein Problem: ich habe die itf-File importiert und ebenfalls im DAX30 (1EUR mini von IG) den gleichen Zeitraum getestet. Ich erhalte ein Ergebnis von ca. 265% Gewinn (26.557,4€ Gewinn bei 10.000€ Einsatz) statt deinen über 1.000%. Ist Dir das Problem bekannt? Was muss ich ändern?

    Gruß, Wisko

    • Reiner • 220 days ago #

      Hallo Wisko,

      Danke für deinen Kommentar und Willkommen. Du hast alles richtig gemacht. Der abgebildete Backtest basiert noch auf der ersten Version von Pathfinder. Damals war die eingestellte Positionsgrösse noch 10. In der aktuellen V3 ist dieser Wert 1. Wenn du einen Backtest mit 10 CFDs machst, erhälst du ein vergleichbares aber deutlich besseres Ergebnis. Pathfinder liefert im Backtest erstaunliche Ergebnisse, ist aber letztlich nur ein optimierter Blick auf historische Daten und keine Garantie auf vergleichbare Ergebnisse in der Zukunft. Passe die Parameter auf deine Risikobereitschaft an bevor du mit echtem Geld handelst. Für die aktuellen Einstellungen sollte ein Kapital von mindest 5.000 Euro vorhanden sein.

      Gruss Reiner

  75. entony • 220 days ago #

    salve sono italiano e parlo poco inglese potete dirmi qual è la versione definitiva del codice e se posso usarla con un conto da 2000euro sul (dax mini contract 1euro)???

    sono giovane e faccio trading da un anno e vorrei sperimentare qualche trading system grazie a chiunque voglia aiutarmi 😉

    • Wisko • 219 days ago #

      Alles klar, dachte mir schon sowas in der Art. MM und RM ist klar. Bin neu hier und gerade erst dabei, mich ein wenig umzusehen und mich mit ProOrder vertraut zu machen.

      Wie sind deine Erfahrungen im echten Trading? Kann der Pathfinder die 80% TQ halten?

    • Reiner • 219 days ago #

      Hi entony,

      Thanks for your comment and welcome. Pathfinders drawdown with a 10.000 Euro account is in best case 15-20%. This mean that an account with 2000 Euro is to small to trade Pathfinder as it is in real mode.

      regards

      Reiner

  76. entony • 219 days ago #
     
    you have something that you would recommend for a small account like mine ??
    thank you
  77. miguel33 • 219 days ago #

    Bisogna aprire prima un conto (IG) poi con PRT inserire il codice in prOrder .

    poi …. Buona fortuna.  

    • entony • 219 days ago #

      #miguel grazie per il consiglio ma volevo chedere se esistesse qualche codice che andasse bene per un conto piccolo come il mio…

  78. Reiner • 219 days ago #

    Hi wisko,

    Ich habe Pathfinder seit der ersten Idee hier veröffentlicht und handle auch genau das System – erst V2, jetzt V3 und bald V4. Die Entwicklung ist aber noch nicht abgeschlossen. Seit mitte Juli entsprechen die Trades den Backtest Ergebnissen, die Treffererquote liegt bei circa 70%, allerdings ist das System bisher ein paar Euro im Verlust. Bei dem gewählten 4H Zeitrahmen wird es auch einige Monate dauern, bis man beurteilen kann, ob es in Realität funktioniert.

    Gruss Reiner

  79. miguel33 • 219 days ago #

    Entony

    come dice reiner ci vogliono mesi per valutare se in reale si hanno gli stessi risultati del backtest .

    Forse sarebbe meglio attendere i risultati oppure puoi provare tu stesso in backtest. 

    Se hai soldi da rischiare puoi andare in reale . Reiner ha postato già la v.3  sul DAX , FTSE e Wallstreet.

    comincia sul Dax (a mio  avviso) mini 1euro . Basta fare copia incolla.

     

  80. Cosmic1 • 214 days ago #

    Reiner, did I ask you before before about IN/OUT sample? Did you check anything this way?

    • Reiner • 213 days ago #

      Cosmic, I’m currently working on better risk and saisonal pattern management. Also the adaptation to other instruments is a topic. I will release a new version of Pathfinder soon . Of course I’m interested in your ideas,let’s discuss later.

    • Nicolas • 213 days ago #

      Hi Reiner, thanks for all your time and effort on replying comments 🙂
      If you plan to involved more ideas of improvements or work on other instruments evolvement of the current code, maybe a forum topic would be a better place to discuss about this. I prefer to let people discuss here as a guidance on a “how-to” for the actual code, not to throw other ideas or codes snippets, more than 130 comments begin to look like a big mess 🙂

  81. miguel33 • 213 days ago #

    Ciao reiner

    it would be useful to include a volatility parameter to pre-trial the system for unexpected events or expected type FED ECB disasters terrorism etc. For example yesterday when the Fed increased interest rates, the system would have recorded a loss

     

    • Reiner • 213 days ago #

      Miguel, Thanks for your idea. I will think about it. May be somthing for V5 because the next release V4 is almost ready.

  82. Elsborgtrading • 213 days ago #

    Hi Reiner. I think My comment to the ver.3 got lost along the rest 🙂 So I’m gonna put it here in the end so I will be noticed

    First of all ..good job!! it a very nice code you have developed and I really like that you works very hard and persistent to optimize and tweak your own code. I will follow your blog with interest.

    The reason why I’m asking, is that I did a monte carlo simulation on the output from the Ver.3 DAX and I showed that a small amount of initial capital as 1000$ only has a 3% chance of ruin, and 1500$ has 0% of ruin the first year. Very positive result, however I see very early the code put up 10 positionsize @ 22 nov. 2012 and risk around 20% of your account? Of cause I see later that you recommend at least 10000$ as an initial capital, and then it not 20% but more around 2% risk.

    I used this small code

    Capital=1000
    equity = Capital + StrategyProfit
    graph ((tradeprice*stopploss)/100)*positionsize*pointvalue*pipsize/(equity+capital)*100 COLOURED(0,0,0) AS "MAXRISK"//Aqua

     

    • Reiner • 212 days ago #

      Hi Elsborgtrading, Thanks for your contribution. Risk management is something that I have to improve in the next versions. I will check your idea.

  83. Cosmic1 • 213 days ago #

     Sounds good Reiner, shall we post here then or forums?

  84. Reiner • 213 days ago #

    I have created a forum topic for discussions related to Pathfinder

    http://www.prorealcode.com/topic/pathfinder-trading-system/

  85. MichiM • 212 days ago #

    Guten Abend Reiner

    Auch von mir an dieser Stelle ein grosses Dankeschön für die Bereitstellung der verschieden Pathfinder-Codes. Der DAX, DOW und FTSE sind bei mir die letzten 2 Tage sehr positiv gelaufen, vielen Dank. Ich würde mir ein automatisiertes Trailingsystem wie es Nicolas in den Blog gestellt hat wünschen. Gerade bei einer Welle 3 wie sie im Moment läuft, kann man somit versuchen das maximum damit rauszuholen.

    • Reiner • 212 days ago #

      Hallo MichiM,

      Danke für deine Anmerkung und Willkommen. Es freut mich, dass du mit einem Gewinn gestartet bist. Ich hatte diverse Trailing Tests gemacht, aber die Ergebnisse waren über einen längeren Zeitraum immer schlechter als die aktuellen Einstellungen. Ich schaue mir das aber nochmal an, weil ich in die nächste Version eine bessere Absicherung der Gewinne einbauen möchte.

      VG, Reiner

    • Reiner • 201 days ago #

      MichiM, ich habe nochmal trailing stop in Pathfinder gtestet. Die Tests liefern keine deutlich besseren Ergebnisse. Hier findest du den Code:

      http://www.prorealcode.com/topic/pathfinder-trading-system/page/4/#post-14262

  86. Skubidu • 207 days ago #

    Hallo Reiner

    Hab die Strategie (V.2., V.3. und auch die Version 4) nun auf dem Demo-Konto seit dem 23.09 laufen. Habe die Positionsgröße auf 1 Kontrakt reduziert und auf dem Demo-Konto sind ca. 30K vorhanden. Es wurde bis jetzt aber noch kein einzige Trade ausgeführt.

    Weisst du wo der Fehler liegt? 

    Vielen Dank.

     

     

    • Reiner • 206 days ago #

      Hallo Skubidu,

      Danke für deinen Kommentar und Willkommen. V4 hat den letzten long Trade am 22.09 erföffnet und am 29.09. geschlossen. Wenn du erst am 23.9 gestartet hast, ist das m.E. richtig, dass Pathfinder bisher keine neue Postion eröffnet hat. Ansonsten solltest du die max. Anzahl Kontrakte in ProOrder auf z.B. 10 setzen, da das System pyramidisiert, wenn du es nicht ausgeschaltet hast.

      Gruß

      Reiner

  87. Skubidu • 206 days ago #

    Vielen Dank für die schnelle Antwort. Habe es auf einen Kontrakt reduziert weil ich danach auch im Live-Trading nur 1 Kontrakt handeln werde.

    Gruss Skubi 🙂

  88. Wisko • 205 days ago #

    Könntest du etwas genauer auf die Signallinie eingehen? Wie kommt dieses komplexe Konstrukt zustande? Ich würde den Pathfinder gerne in einem anderen Programm laufen lassen, bekomme aber die Signallinie nicht programmiert.

    • Reiner • 205 days ago #

      Wisko, die Signallinie ist eine der Key-Komponenten von Pathfinder. Ein mehrfach geglätteter, gleitender Durchschnitt, welcher fast ohne Time-Lag sehr gut den Kursverlauf abbildet und gleichzeit das Rauschen eliminiert wird als Trendindikator verwendet. Das gewählte Konstrukt verhält sich sehr robost in Seitwärtsphasen. In PRT ist das sehr einfach umzusetzen mit Hilfe der zwei  GDS Wilder und TimeSeries.

      firstMA = WilderAverage[periodFirstMA](close)
      secondMA = TimeSeriesAverage[periodSecondMA](firstMA)
      signalline = TimeSeriesAverage[periodThirdMA](secondMA)

      Wenn du dies in einem anderen System nicht abilden kannst, versuche alternativ andere adaptive Durchschnitte wie z.B. Dema, Hull, Tema, Kaufmann, Mesa, T3, Jurik usw. Ich hatte in PRT alle möglichen getestet, keine lieferte allerdings so gute Ergebnisse wie der von mir gewählte Ansatz. Generell sollten aber andere adaptive Durschnitte zumindest ähnliche Ergebnisse liefern.

    • Reiner • 203 days ago #

      Wisko asked for an alternative calculation of the signalline because he wants migrate Pathfinder to another platform. I have tested several moving averages and the original used formula is still the best. I tested some alternative adaptive averages from the library (e.g. MAMA, FAMA, KAMA, TEMA, DEMA, etc) and one of the best result delivers the Hull Average. Here is the used formular:

      Period = 15
      inner = 2 * WeightedAverage[round(Period/2)](close) - WeightedAverage[Period](close)
      HullAverage = WeightedAverage[round(sqrt(Period))](inner)
      signalline = HullAverage

       

    • Nicolas • 203 days ago #

      Have you tried ALMA?

    • Reiner • 202 days ago #

      ALMA was the second best and also delivers good results but Hull is more “sustainable”

    • Wisko • 201 days ago #

      Vielen Dank für deine Hilfe, Reiner. Ich werde mir das mal ansehen

  89. ALEALE • 202 days ago #

    HELLO REINER,

    I’M WRITING A SRATEGY ON 15 M CHART WHICH CAN WORK WITH YOUR PATHFINDER STRATEGY
    COUD YOU  SET STRATEGY TO WORK WITH 15 M TIME FRAME, TO HAVE THE SAME POSITION OF THE 4 H TIME FRAME , IN THE LAST 2 YEARS?

    ON THE EXCEL FILES I’VE SEEN THAT THE TWO STRATEGY, IF THEY WORK TOGETHER LOWER DRAWDOWN AND INCREASE PROFIT.

    THE ACTUALLY RESULT OF THE TWO STRATEGY IN THE LAST 25 MONTH ARE THE FOLLOWING :
    DEPOSIT 5500€
    DRAWDOWN 1250€

    RATIO 1.85

    GAIN 27.823 ,00€

    IT WOUD BE A GOOD STRATEGY NOT RELATED

    PS: I’M PREPARING FILES TO SHARE MY STRATEGY IN THE NEXT DAYS

     

     

    THANKS

    ALE

    • Reiner • 202 days ago #

      ALE, I haven’t use 15M with Pathfinder so far. Let us take part on your work and share the results.

    • ALEALE • 201 days ago #

      Hello reiner

      yes I’m working on it

      tks

  90. MichiM • 201 days ago #

    Guten Morgen Reiner

    Ich sehe gerade, dass der Dax in der Pathfinder Version 3 und 2 gestern Abend um 17.00 Uhr long gegangen ist (Dow übrigens auch). Bei mir laufen alle deine Versionen und keine auch nicht der Dow ist bei mir long gegangen.

    Hat das mit der Positionsgrösse zu tun? Es sollte doch 1 CFD Kontrakt reichen oder nicht?

    Lieben Dank für deine Antwort.

    • Reiner • 201 days ago #

      MichiM, ich handle aktuell life nur V4 und kann deine Aussage bestätigen, dass das System gestern um 17:00 Uhr bei 10501 long gegangen ist. Ich habe das System mit max 15 Kontrakte gestartet, da per default durch Pyramidisierung und saisonale Verstärker mehr als 1 Kontrakt gehandelt werden können. Ich empfehle, auch wenn du das System so eingestellt hast, dass du nur 1 Kontrakt handeln möchtest, die max Kontrakte auf einen grösseren Wert zu setzen.

  91. Wisko • 195 days ago #

    Hey Reiner,

    im Backtest sieht es so aus, als ob Trades nur zum Open einer neuen 4h-Kerze eröffnet werden. Wie läuft das im Live-Trading? Wird der Trade eröffnet, sobald der CrossOver/Under der Signallinie passiert? Was passiert, wenn der Kurs um ein High/Low Level schwankt und es innerhalb kurzer Zeit mehrere CrossOvers/Unders gibt?

    Ich hab auch noch eine Frage zur Tradingzeit: Trades werden nur zwischen 8 und 22 Uhr gestartet, ich gehe also davon aus, dass auch nur dann die CrossOvers/Unders zählen und nachts stattfindende Crosses ignoriert werden, oder? Wie sieht es mit den Ausstiegen aus? Wenn nachts ein SL/TP erreicht wird, oder die jeweilige Anzahl der Kerzen erreicht wird, wird dann direkt verkauft oder erst am nächsten Morgen um 8?

    Danke schonmal für die Hilfe

     

    • Reiner • 195 days ago #

      Hi Wisko,

      Der Trade Entry erfolgt im DAX nur zur Eröffnung der Kerzen um 9, 13, 17 und 21 Uhr und wenn genau! zu diesem Zeitpunkt ein Crossover/-under vorliegt. Crossings ausserhalb des Trading Windows führen nicht zu einem Trade. SL/TP ist im Life Trading bisher nur im Trading Window eingetreten, ich vermute aber, dass dies generell auch ausserhalb des Fensters passieren könnte, diese Fälle sind aber sehr selten und du kannst diese dann morgens um 8/9 schliessen. Tritt die Erreichnug der maximalen Haltedauer ausserhalb des Tradingfensters ein, wird morgens um 9:00 die Position glattgestellt.

      Auf welche Plattform willst du Pathfinder migrieren?

      Gruß Reiner

  92. Wisko • 195 days ago #

    OK, falls es also vorkommen sollte, dass zB der Cross der Signallinie über das Daily High während einer langen bullischen Kerze erfolgt und bei Beginn der neuen Kerze demnach kein neuer CrossOver vorliegt, findet kein Trade statt? Die Signallinie müsste sich doch (wie andere MAs auch) während die Kerze wächst auch bewegen, oder? Hast du das mal beobachten können?

    Ich würde den Pathfinder gerne auf die MT4-Plattform übertragen, da dort Microlots (0,1 €/Punkt) angeboten werden und dadurch ein deutlich präziseres Risikomanagement möglich ist.

    • Reiner • 194 days ago #

      die Prüfung der Bedingungen erfolgt ausschließlich beim Open der Kerze z.B. 9:00:00, in deinem skizzierten Szenario wird nicht gehandelt

  93. Wisko • 194 days ago #

    Alles klar, danke

  94. ALE • 194 days ago #

    this strategy is formidable, the jpeg above is of the first version?

    • Reiner • 194 days ago #

      Yes, description and picture is still from V1. We shoult make an update. Current version is available in the forum.

  95. volpiemanuele • 183 days ago #

    hi, can i have the latest version of the strategy ? I wont to try it in FTSE 100 cash on IG market. What is the time frame that you suggest me to use ? 4H? And the time zone ? 8 -22 the same of DAX?  What are the variable that I must to optimize ? Thanks Emanuele

  96. Wilko • 180 days ago #

    Dear Reiner,

    Thank you for posting an interesting system, indeed. I’m looking at it and trying to analyse potential weaknesses. I was a bit sceptical to the numbers you are using for the triple smoothing. I suspected that you had merely curve-fitted, but so far I have run the optimisation myself, and it appears that neighbouring numbers work almost equally well, although your chosen numbers are “optimal”. But this result would indicate that the notion of triple smoothing is not necessarily curve fitted. What bothers me, though, is that PRT backtest, for all its’ benefits, has a couple of serious drawbacks that can give you very different results if/when you go live. One of them is that it appears (at least to me) that PRT backtest is unable to handle backtesting a system that can trigger both a long and short position. I can’t see that the code will in itself not trigger both a long and then a short on a different signal cross-over, or vice-versa. So my question is; Have you tried to disintegrate the system into its different “parts” ie treat each signal separatetely in a system for each signal, to see if you get the same results when you add them up?

    Kind regards,

    Wilko

  97. Wilko • 180 days ago #

    Dear Reiner, dear fellow forum members,

    After writing the previous post, I have myself decomposed the system into several independent systems and backtested them separately without the seasonailty boosting. What I found was that each of the parts/strategies independently generated not many trades over the full available database. In other words, allthough the outcome for each part/strategy may be positive, it is based on few observations, meaning the statistical expectation that historical results would repeat is weak. If you merely add a lot of weak parts/strategies together, this does not in itself guarntee the end-result is a strong (or rubust) system. Therefore, I would issue a warning: The parts/strategies incorporated in this system need to be tested independently on a much bigger dataset in order to be able to say with any statistical significance that the integrated system is likely to repeat past performance. In my book, one needs at least 100 observations for each of the different parts/strategies. To avoid misunderstanding, with parts I mean one part/strategy buys break of monthly high, the next part/strategy buys on break of weekly high, and so on. Pathfinder is comprised of 7 different parts/strategies. On top of that filters and seasonality boosts are applied, not uniformly, increasing the risk of curve-fitting. IMHO.

    There are some nice ideas in the code that have been well applied, and for these ideas I thank Reiner!  I’m not saying the integrated system won’t work, I’m saying the certainty that it will work live is not high enough for me. I hope my findings can be of some help to fellow forum members. Please be careful out there! (Quote h/t the tv-series Hill Street Blues from the 80’s)

    • Reiner • 179 days ago #

      Hi Wilko,

      Thanks for your feedback and welcome. I will move your comment to the realated forum for further discussion. I think many people are really interested to underand a little bit more your arguments.

      best, Reiner

    • flowsen123 • 179 days ago #

      Hey Wilko,

      that is an interesting point. could you upload the results of the “single” test that you made? if I understood you correct, you see this strategy as several strategies that are combined and you tested them separatly?

      Thank you

      Flo

  98. Wilko • 179 days ago #

     Sure. I’d be happy to answer any questions. /Wilko

  99. GAMMA • 147 days ago #

    thank you for this system, I try to run on down/nd  very good, but when I try on sp500 it not take any trade? try crude oil not good luck ,

    looking forward  to hear from you

     

    • Reiner • 146 days ago #

      Hi GAMMA,

      I didn’t offer a Pathfinder version for sp500 because backtests were very poor.

      best, Reiner

  100. GAMMA • 146 days ago #

    i can understand that sp 500 other animal  , do you have for crude oil or brunt oil ?

    thank you in advance.

  101. naqviak • 144 days ago #

    Is this strategy converted to Ninja trader 7/8 by someone? If so, can I find the link?

    • Nicolas • 144 days ago #

      Sorry, this website is dedicated to prorealtime programming, I don’t any Ninjatrader stuff around here! do you??

  102. Mr Mackey • 137 days ago #

    Greeting Reiner, Simon here from London…

    Just joined this site, even though I have no clue to programming, what a great site… I was intrigued by your code…

    I like using DFB spreadbetting here in London for tax reasons so I backtested pathfinder v3 for DAX30 and found fantastic results, I compared it to v4 and the results wasnt nearly as good, so here are my questions:

    I am running v3 on a demo account and it opened a position at £2 per point, how do you change these figures?

    The open position has put a stop nearly 500 points away? I do not understand this as it is using the margin?

    Same for the limit, nearly 500 points away

    When I activated the autotrading, proorder asked for my position size, I inputed 10 per point, but the bet is still 2 per point?

    Only opened it yesterday and the first order is, so far, doing well!!!!!

    Thanks in advance

    Simon

     

    • Reiner • 137 days ago #

      Hi Simon,

      Thanks for your comment and welcome. You’ll find the last news and releases for Pathfinder here in the forum http://www.prorealcode.com/topic/pathfinder-trading-system/

      In the meantime we have version 6 running. All settings are controlled by the code and have nothing to do with the margin. Pathfinder is pyramiding the position and the position size is related to a saisonal multiplier. The requested position size in ProOrder is a maximal value in a sense of an overall limit for the whole strategy. By default Pathfinder is trading maximal 15 contracts. I recommend that you go through the forum entries and create a post if something isn’t clear. There are also some UK guys subscribed with the same IG accout features to answer your questions.

      best, Reiner

  103. Mr Mackey • 137 days ago #

    Thank you Reiner for responding, I can only find v4, am I looking at something wrong?

    Pathfinder not to be used for DFB?

    • Reiner • 136 days ago #

      Simon, what is DFB? Please ask further question in the related forum topic.

  104. demoz • 126 days ago #

    Did anyone test this out with a live account?

  105. volpiemanuele • 98 days ago #

    Good morning,

    I would use the strategy on my IG account on FTSE 100 futures, rometime (9/22). Someone have already optimized this strategy on this instrument? Please could you give me a link of the ultimate version of the strategy. If no one has optimized the strategy on this market please could you tell me which parameters I have to optimized and the best time frame? Thanks emanuele

    • Bandido • 98 days ago #

      Emanuele, vai nel forum e troverai di tutto e di più 😉

    • Reiner • 98 days ago #

      Hi Emanuele and welcome,

      You’ll find the latest versions at the first post in the related forum https://www.prorealcode.com/topic/pathfinder-trading-system/#post-13565

      Best, Reiner

  106. volpiemanuele • 95 days ago #

    Tanks, if I want to enter in a market only with 1 lot do you confirm that I cam modify only this parameters? Also the seasonal logic is bypassed with these parameters? 

    DEFPARAM CUMULATEORDERS = false
    ONCE longPositionMultiplier = 1
    ONCE shortPositionMultiplier = 1

    • Reiner • 95 days ago #

      Emanuele, please ask in forum in the future. Set position size and maximum position as well. Please be aware that Pathfinder’s performance based on grid orders and without you have another system with much higher drawdown. I’ve posted a Pathfinder DAX version for small accounts (4k).

  107. volpiemanuele • 95 days ago #

    Ok, thanks

  108. Master_Code • 85 days ago #

    Bonjour,

    Je ne comprends pas bien ce qu’apporte la V3 par rapport à la V2, car le ratio nb Gain/ nb Perte est légèrement inférieur.

    Merci.

     

  109. Master_Code • 85 days ago #

    Bonjour,

    Est ce normal qu’un ordre ne passe pas en backtest, mais passe en réel ?

    Ca m’a crée une perte très douloureuse.

    Merci de votre partage.

     

  110. djtaktik • 69 days ago #

    Hello reiner,

    How do you explain that pathfinder have good results on DAX but not on the CAC ?

     

    • Nicolas • 69 days ago #

      You should join and read the forum thread about this strategy. There are plenty of different parameters to adapt from an instrument to another. Since I’m not the author of this code, Reiner could probably answer with more details though.

    • Reiner • 69 days ago #

      Hi djtaktik and welcome,

      I have answered your question in the related Pathfinder forum because I want show you a picture.

      https://www.prorealcode.com/topic/pathfinder-trading-system/page/55/#post-24973

      Best, Reiner

  111. danver34 • 50 days ago #

    is this version the definitive one or from the original one have there been modifications to the code ? Also I see that members have used it on different time fames any time frame that was favourite or is 4H still the best for dax?

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar

+53 more likes

Related users ' posts
bjoern You are absolutely right, thank for your comment. Already working on an optimization while u...
bjoern Added a range filter for entering positions. Performance seems to be much better, even with ...
Nicolas Thanks!
ALE Thanks Paris
iramirez55 Bonita estrategia. Gracias ALE
ALE ... thanks I hope could help our community!
Dagge99 Why are you the only one sharing unfinished strategys that doesn't perform well? To help us ...
Nicolas What are you calling a finished strategy? This one has been coded by a request on forums, si...
clanli Hi Nicolas Thanks for a fantistic piece of code. I tried the following with really good res...
Elsborgtrading I have moved the development topic https://www.prorealcode.com/topic/development-of-initial-...
Elsborgtrading Sometime along the way since I coded the Indicator something has change in PRT- at least I t...
Elsborgtrading Btw last code was a 10 min TF ver. 
Derek Nice strategy. Have you tried adding a stop loss since there are a few sharp drawdowns? I ...
Piston_Broke Non so .... da qui la mia domanda iniziale :-)
Piston_Broke Hi Derek. I have tried many different ways to apply SL's to this and similar versions of th...
Nicolas Indeed, if you are not willing to loose, you will always win. Averaging down losers can carr...
David You're always safer going Long especially with averaging down on an index as the probability...
Oskar Bergvall  I noted Davids and Nicolas remarks. Could it be possible to make an indicator for contraria...
bluetime6 Hello Nicolas. Can i ask you for something? I backtested your strategy in Dax 4H Timeframe...
Francesco78 Thank you Nicolas,  I have copied your nice indicator, but it shows in the lower part of th...
Abz  hi , you need to add the indicator from the "price" menu in chart
Francesco Thank you Abz!
Lotar
2 months ago
Lotar Hi Plop61, thanks for your comment. To make the code for short positions is possible. But ...
JvdG Hi Lotar, your strategy raised my interest; I did some tests and made a few adjustments fit...
Nicolas You can send it to contact@prorealcode.com and I'll attach it here. Thanks for your sharing!
iramirez55 thanks for all
johnymon Hi Reiner, Many thanks for the  superb strategy.I just tried to back-test on prerealtime bu...
Reiner Hi Joy John, Navigator will allways sell at 9:00 at the first tdom and will accumulate a lo...
SAM
2 months ago
Elsborgtrading By adding the inside bar breakout failure candle, which is the next bar after the inside bar...
Wing Yes, investigate as much as you want. For more insight, you can view the linet1, linet2 etc....
CKW Hi Wing, Thanks for your sharing. I am still trying to breakdown & understand your code...
Wing Hello CKW. No, the parameter, 7 in this case, is used when calling the RSI indicator to ide...
Nicolas For everyone information, a discussion thread is ongoing here: https://www.prorealcode.com/t...
larouedegann Bonjour Nicolas, comment se fait-il qu'avec cette stratégie stop loss à 5 pips, PRT mettant...
Nacho Buenos días Raul, tengo puesto este sistema desde hace unos días en una cuenta demo en la ve...
pascal3431 Salut Doc , Je ne vois pas ce qui fait office de stop dans ce code .. un retour dans le nua...
Doctrading Bonjour, Il s'agit juste d'une stratégie où on est toujours en position : soit à l'achat / ...
pascal3431 Bonjour, après quelques essais sur EUR/USD au M15 en rajoutant(car sinon on est en perte) u...
Doctrading Nice Job ! Here is my version of the code :  KBO = 0 Tenkansen = (highest[9](high)+lowe...
Elsborgtrading Hi Triss. the File is in the post for download. There is nothing wrong with the code. Your e...
danhei Hi I am tryong to figure out how trist strategy works. I am new to pro real time. Can some...
Plop61 Hello,Thank you for sharing this beautiful strategy.Is it possible to indicate the code for ...
ALE
6 months ago
maxxb a ok quindi potrei anche non aver sbagliato nulla ... grazie ..  
sunandsea12345 scusate sono nuovo del forum ,dove posso chiedere come posso generare un codice che mi perme...
ALE Ciao Puo andare nel forum Supporto pro order In fondo troverai lo spazio per inserire un ...
fepabe Ciao Ale, porta pazienza ma facendo copia incolla del codice non mi restituisce alcun valore...
arke Hi Cosmic, I saw that you are able to do a backtest on DAX in 15Min timeframe till 6 years ...
David Somogyi Hello ALE I've been running your strategy in demo for the last two weeks, but it hasn't ent...

Top