Pathfinder Trading System
Forums › ProRealTime English forum › ProOrder support › Pathfinder Trading System
- This topic has 1,834 replies, 139 voices, and was last updated 1 year ago by CFD AutoTrading.
Tagged: Pathfinder
-
-
09/22/2016 at 8:00 PM #13565
Hi guys,
this topic is for all discussions related to the Pathfinder trading system strategies. The system based on four components that work perfectly together.
- signalline – instrument trend line based on two smoothed averages (Wilder and Time Series)
- breakout levels – previous daily, weekly and monthly high/lows in combination with fast and slow averages as filters because not every breakout is profitable
- saisonal behavior – position size will be boost with a multiplier for each month depending on the historical seasonal behavior
- smart money and position management – grid orders, maximal position size monitoring, superordinate stop loss/take profit, trailing stop and maximum holding periods are used mechanisms
The Pathfinder breakout logic works well for many instruments with 24 hour quotes such as DAX, DOW, FTSE, Hang Seng, NIKKEI in 4 hours timeframe. All versions are optimized for an 10k Euro account.
Pathfinder strategies offer a statistical advantage but are of course not a holy grail and there is no guarantee to make money with it. The systems are optimized for historical data and historical gains are not a guarantee to be successful in the future. I strictly recommend to adjust the position sizes to your personal account size and try first in demo mode. The results in life trading will differ from the backtest results. I also recommend to start in life trading with a small account size. Anyone can use the programs for free and at their own risk.
Pathfinder is my private and fully transparent algorithmic trading project exclusively implemented for ProRealTime 10.3. The status is experimental and I don’t trade all the systems presented here. I would also like to thank all members who have helped to improve the system with their contributions.
Please find below the last released Pathfinder trading system versions for suitable instruments.
Dropbox Link: https://www.dropbox.com/sh/xyymvk6gscxbfbe/AABaOs9_ZExILA18HxKW9kdqa
Best, Reiner
04.02.2018 Updated dropbox with new algos V7-FEB-2018 with automatic scaling for ASX, DAX, DOW, FTSE, GOLD, HS, NIKKEI, SAF and STXE (#post-61450)
08.01.2017 Checkout the results from 2017 (#post-56978) || introducing new PF algo category DAX-1H-V8 (#post-57005) || new algos in dropbox DAX-V7-2018 (#post-57521), DOW-V7-2018 (#post-57524) and HS-V7-2018 (#post-57528)
02.08.2017 Updated dropbox with new algos FTSE-V7 and Nikkei-V7 (#post-42223), ASX-V7 (#post-42249) and STXE-V7 (#post-42332)
31.07.2017 Updated dropbox with new algos DAX-V7-2, DOW-V7-2 and HS-V7-2 (#post-41811)
18.07.2017 Release V7 containing error fixes, improvements and new features for DAX-V7 (#post-40798) and DOW-V7 (#post-40880)Total of 57 users thanked author for this post. Here are last 10 listed.
09/22/2016 at 8:31 PM #13568Hi Reiner, Great work on the code. Can I ask what variables you have been optimising in your backtests? I’d like to run this live but I wanted to run some IN/OUT testing first.
6 users thanked author for this post.
09/23/2016 at 9:58 AM #13605Hi Cosmic1, here are the optimized variables that are important for your test. Also check these variables if you want to adjust Pathfinder to other instruments.
123456789101112131415ONCE periodThirdMA = 3 // this variable define the "heartbeat" of every instrument and have to be adjusted, possible values are 3, 4, 5, 6, 7// filter parameterONCE periodLongMA = 250 // the settings of the filter periods are also important for the profit factor, 200, 250, 300 are good valuesONCE periodShortMA = 50 // 10, 40 or 50 are good settings// money and position management parameter - these parameters are important for the risk and performanceONCE stoppLoss = 5 // in % the system would works without a stopp loss, it's more in the sense of a disaster exitONCE takeProfitLong = 2 // in %ONCE takeProfitShort = 1.75 // in %ONCE maxCandlesLongWithProfit = 18 // take long profit latest after 18 candles - 15 with a higher take profit is my new favorite in the next versionONCE maxCandlesShortWithProfit = 13 // take short profit latest after 12 candles - 13 is a good value for every instrumentONCE maxCandlesLongWithoutProfit = 30 // limit long loss latest after 30 candles - 30 or 40 are good valuesONCE maxCandlesShortWithoutProfit = 25 // limit short loss latest after 25 candles - 25 is my favorite for all instruments3 users thanked author for this post.
09/23/2016 at 12:49 PM #1361809/23/2016 at 2:29 PM #1362809/23/2016 at 2:53 PM #1363409/23/2016 at 7:26 PM #13641I have created a new version. Pathfinder V4 is now more applicable to other indices such as DOW or FTSE. Here are the changes:
- reorganize the code a little bit to make things clearer
- introduce maximal position size for long and short trades to avoid an excessive risk
- separation of the stop loss for long and short trades
- introduce monthly saisonal pattern management
- adjust signal and filter logic for other indices such as FTSE or DOW
- modify some trading parameter
changes in detail for the DAX:
- new: maxPositionSizeLong
- new: maxPositionSizeShort
- new: stoppLossShort
- change: periodLongMA = 300 // 250
- change: stopLossLong = 5 // 5.5
- change: takeProfitLong = 2.75 // 2
- change: maxCandlesWithProfit = 15 // 18
- rename: c1, c2, c3 in f1, f2, f3
- remove: c4 filter
- remove: monthlyLow for short trades
Here is the code for the DAX (backtest result is attached):
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167// Pathfinder Trading System based on ProRealTime 10.2// Breakout system triggered by previous daily, weekly and monthly high/low crossings with smart position management// Version 4// Instrument: DAX mini 4H, 8-22 CET, 2 points spread, account size 10.000 Euro// ProOrder code parameterDEFPARAM CUMULATEORDERS = true // cumulate orders if not turned offDEFPARAM PRELOADBARS = 10000// define intraday trading windowONCE startTime = 80000ONCE endTime = 220000// define instrument signalline with help of multiple smoothed averagesONCE periodFirstMA = 5ONCE periodSecondMA = 10ONCE periodThirdMA = 3// define filter parameterONCE periodLongMA = 300ONCE periodShortMA = 50// define position and money management parameterONCE positionSize = 1ONCE maxPositionSizeLong = 15ONCE maxPositionSizeShort = 10ONCE stopLossLong = 5.5 // in %ONCE stopLossShort = 3.5 // in %ONCE takeProfitLong = 2.75 // in %ONCE takeProfitShort = 1.75 // in %ONCE maxCandlesLongWithProfit = 15 // take long profit latest after 15 candlesONCE maxCandlesShortWithProfit = 13 // take short profit latest after 13 candlesONCE maxCandlesLongWithoutProfit = 30 // limit long loss latest after 30 candlesONCE maxCandlesShortWithoutProfit = 25 // limit short loss latest after 25 candles// define saisonal position multiplier >0 - long / <0 - short / 0 no tradeONCE January = 2ONCE February = 2ONCE March = 2ONCE April = 3ONCE May = 2ONCE June = 2ONCE July = 3ONCE August = -1ONCE September = -2ONCE October = 1ONCE November = 3ONCE December = 3// calculate daily high/lowdailyHigh = DHigh(1)dailyLow = DLow(1)// calculate weekly high/lowIf DayOfWeek < DayOfWeek[1] thenweeklyHigh = Highest[BarIndex - lastWeekBarIndex](dailyHigh)lastWeekBarIndex = BarIndexENDIF// calculate monthly high/lowIf Month <> Month[1] thenmonthlyHigh = Highest[BarIndex - lastMonthBarIndex](dailyHigh)monthlyLow = Lowest[BarIndex - lastMonthBarIndex](dailyLow)lastMonthBarIndex = BarIndexENDIF// calculate instrument signalline with multiple smoothed averagesfirstMA = WilderAverage[periodFirstMA](close)secondMA = TimeSeriesAverage[periodSecondMA](firstMA)signalline = TimeSeriesAverage[periodThirdMA](secondMA)// trade only in defined trading windowIF Time >= startTime AND Time <= endTime THEN// filter criteria because not every breakout is profitablef1 = close > Average[periodLongMA](close)f2 = close < Average[periodLongMA](close)f3 = close > Average[periodShortMA](close)// saisonal patternIF CurrentMonth = 1 THENsaisonalPatternMultiplier = JanuaryELSIF CurrentMonth = 2 THENsaisonalPatternMultiplier = FebruaryELSIF CurrentMonth = 3 THENsaisonalPatternMultiplier = MarchELSIF CurrentMonth = 4 THENsaisonalPatternMultiplier = AprilELSIF CurrentMonth = 5 THENsaisonalPatternMultiplier = MayELSIF CurrentMonth = 6 THENsaisonalPatternMultiplier = JuneELSIF CurrentMonth = 7 THENsaisonalPatternMultiplier = JulyELSIF CurrentMonth = 8 THENsaisonalPatternMultiplier = AugustELSIF CurrentMonth = 9 THENsaisonalPatternMultiplier = SeptemberELSIF CurrentMonth = 10 THENsaisonalPatternMultiplier = OctoberELSIF CurrentMonth = 11 THENsaisonalPatternMultiplier = NovemberELSIF CurrentMonth = 12 THENsaisonalPatternMultiplier = DecemberENDIF// long position conditionsl1 = signalline CROSSES OVER monthlyHighl2 = signalline CROSSES OVER weeklyHighl3 = signalline CROSSES OVER dailyHighl4 = signalline CROSSES OVER monthlyLow// short position conditionss1 = signalline CROSSES UNDER monthlyHighs2 = signalline CROSSES UNDER dailyLow// long entryIF ( l1 OR l4 OR l2 OR (l3 AND f2) ) THEN // cumulate orders for long tradesIF saisonalPatternMultiplier > 0 THEN // check saisonal booster setup and max position sizeIF (COUNTOFPOSITION + (positionSize * saisonalPatternMultiplier)) <= maxPositionSizeLong THENBUY positionSize * saisonalPatternMultiplier CONTRACT AT MARKETENDIFELSIF saisonalPatternMultiplier <> 0 THENIF (COUNTOFPOSITION + positionSize) <= maxPositionSizeLong THENBUY positionSize CONTRACT AT MARKETENDIFENDIFstopLoss = stopLossLongtakeProfit = takeProfitLongENDIF// short entryIF NOT SHORTONMARKET AND ( (s1 AND f3) OR (s2 AND f1) ) THEN // no cumulation for short tradesIF saisonalPatternMultiplier < 0 THEN // check saisonal booster setup and max position sizeIF (COUNTOFPOSITION + (positionSize * ABS(saisonalPatternMultiplier))) <= maxPositionSizeShort THENSELLSHORT positionSize * ABS(saisonalPatternMultiplier) CONTRACT AT MARKETENDIFELSIF saisonalPatternMultiplier <> 0 THENIF (COUNTOFPOSITION + positionSize) <= maxPositionSizeLong THENSELLSHORT positionSize CONTRACT AT MARKETENDIFENDIFstopLoss = stopLossShorttakeProfit = takeProfitShortENDIF// stop and profit managementposProfit = (((close - positionprice) * pointvalue) * countofposition) / pipsizem1 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithProfitm2 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithProfitm3 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithoutProfitm4 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithoutProfitIF LONGONMARKET AND (m1 OR m3) THENSELL AT MARKETENDIFIF SHORTONMARKET AND (m2 OR m4) THENEXITSHORT AT MARKETENDIFSET STOP %LOSS stopLossSET TARGET %PROFIT takeProfitENDIFTotal of 12 users thanked author for this post. Here are last 10 listed.
09/23/2016 at 7:51 PM #13644Will take some time to look at this over the weekend but looks very impressive. I finished running some IN/OUT opp just now on V3 Jan 2009 – March 2014 and results were very similar on the forward test, infact slightly better so this gives very good confidence. 🙂
1 user thanked author for this post.
09/23/2016 at 8:05 PM #13645The consideration of seasonal patterns have improved my trading results significantly. Especially for commodities they are very helpful. On the webpage http://www.equityclock.com you will find excellent information about this topic. I have created a first Pathfinder version for crude oil based on the historic backtest results of saisonal patterns http://charts.equityclock.com/crude-oil-futures-cl-seasonal-chart. Unfortunately IG PRT has only a very limited data history and maybe someone with longer history is able to check the reliability of the results.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172// Pathfinder Trading System based on ProRealTime 10.2// Breakout system triggered by previous daily, weekly and monthly high/low crossings with smart position management// Version 1// Instrument: CL mini 4H, 7-23 CET, 3 points spread, account size 10.000 Euro// ProOrder code parameterDEFPARAM CUMULATEORDERS = true // cumulate orders if not turned offDEFPARAM PRELOADBARS = 10000// define intraday trading windowONCE startTime = 70000ONCE endTime = 230000// define instrument signalline with help of multiple smoothed averagesONCE periodFirstMA = 5ONCE periodSecondMA = 10ONCE periodThirdMA = 4// define filter parameterONCE periodLongMA = 100ONCE periodShortMA = 10// define position and money management parameterONCE positionSize = 1ONCE maxPositionSizeLong = 15ONCE maxPositionSizeShort = 15ONCE stopLossLong = 10 // in %ONCE stopLossShort = 5 // in %ONCE takeProfitLong = 8 // in %ONCE takeProfitShort = 10 // in %ONCE maxCandlesLongWithProfit = 20 // take long profit latest after 20 candlesONCE maxCandlesShortWithProfit = 13 // take short profit latest after 13 candlesONCE maxCandlesLongWithoutProfit = 40 // limit long loss latest after 40 candlesONCE maxCandlesShortWithoutProfit = 25 // limit short loss latest after 25 candles// define saisonal position multiplier >0 - long / <0 - short / 0 no trade (www.equityclock.com)ONCE January = 5ONCE February = -5ONCE March = 5ONCE April = 5ONCE May = 5ONCE June = 5ONCE July = 5ONCE August = 5ONCE September = 5ONCE October = -5ONCE November = -5ONCE December = 3// calculate daily high/lowdailyHigh = DHigh(1)dailyLow = DLow(1)// calculate weekly high/lowIf DayOfWeek < DayOfWeek[1] thenweeklyHigh = Highest[BarIndex - lastWeekBarIndex](dailyHigh)weeklyLow = Lowest[BarIndex - lastWeekBarIndex](dailyLow)lastWeekBarIndex = BarIndexENDIF// calculate monthly high/lowIf Month <> Month[1] thenmonthlyHigh = Highest[BarIndex - lastMonthBarIndex](dailyHigh)monthlyLow = Lowest[BarIndex - lastMonthBarIndex](dailyLow)lastMonthBarIndex = BarIndexENDIF// calculate instrument signalline with multiple smoothed averagesfirstMA = WilderAverage[periodFirstMA](close)secondMA = TimeSeriesAverage[periodSecondMA](firstMA)signalline = TimeSeriesAverage[periodThirdMA](secondMA)// trade only in defined trading windowIF Time >= startTime AND Time <= endTime THEN// filter criteria because not every breakout is profitablef1 = close > Average[periodLongMA](close)f2 = close < Average[periodLongMA](close)f3 = close > Average[periodShortMA](close)// saisonal patternIF CurrentMonth = 1 THENsaisonalPatternMultiplier = JanuaryELSIF CurrentMonth = 2 THENsaisonalPatternMultiplier = FebruaryELSIF CurrentMonth = 3 THENsaisonalPatternMultiplier = MarchELSIF CurrentMonth = 4 THENsaisonalPatternMultiplier = AprilELSIF CurrentMonth = 5 THENsaisonalPatternMultiplier = MayELSIF CurrentMonth = 6 THENsaisonalPatternMultiplier = JuneELSIF CurrentMonth = 7 THENsaisonalPatternMultiplier = JulyELSIF CurrentMonth = 8 THENsaisonalPatternMultiplier = AugustELSIF CurrentMonth = 9 THENsaisonalPatternMultiplier = SeptemberELSIF CurrentMonth = 10 THENsaisonalPatternMultiplier = OctoberELSIF CurrentMonth = 11 THENsaisonalPatternMultiplier = NovemberELSIF CurrentMonth = 12 THENsaisonalPatternMultiplier = DecemberENDIF// long position conditionsl1 = signalline CROSSES OVER monthlyHighl2 = signalline CROSSES OVER weeklyHighl3 = signalline CROSSES OVER dailyHighl4 = signalline CROSSES OVER monthlyLow// short position conditionss1 = signalline CROSSES UNDER monthlyHighs2 = signalline CROSSES UNDER weeklyHighs3 = signalline CROSSES UNDER weeklyLows4 = signalline CROSSES UNDER dailyHighs5 = signalline CROSSES UNDER dailyLow// long entryIF ( l1 OR l4 OR l2 OR (l3 AND f2) ) THEN // cumulate orders for long tradesIF saisonalPatternMultiplier > 0 THEN // check saisonal booster setup and max position sizeIF (COUNTOFPOSITION + (positionSize * saisonalPatternMultiplier)) <= maxPositionSizeLong THENBUY positionSize * saisonalPatternMultiplier CONTRACT AT MARKETENDIFELSIF saisonalPatternMultiplier <> 0 THENIF (COUNTOFPOSITION + positionSize) <= maxPositionSizeLong THENBUY positionSize CONTRACT AT MARKETENDIFENDIFstopLoss = stopLossLongtakeProfit = takeProfitLongENDIF// short entryIF NOT SHORTONMARKET AND ( (s1 AND f3) OR (s2 AND f1) OR (s3 AND f2) OR (s4 AND f1) OR (s5 AND f1) ) THEN // no cumulation for short tradesIF saisonalPatternMultiplier < 0 THEN // check saisonal booster setup and max position sizeIF (COUNTOFPOSITION + (positionSize * ABS(saisonalPatternMultiplier))) <= maxPositionSizeShort THENSELLSHORT positionSize * ABS(saisonalPatternMultiplier) CONTRACT AT MARKETENDIFELSIF saisonalPatternMultiplier <> 0 THENIF (COUNTOFPOSITION + positionSize) <= maxPositionSizeLong THENSELLSHORT positionSize CONTRACT AT MARKETENDIFENDIFstopLoss = stopLossShorttakeProfit = takeProfitShortENDIF// stop and profit managementposProfit = (((close - positionprice) * pointvalue) * countofposition) / pipsizem1 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithProfitm2 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithProfitm3 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithoutProfitm4 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithoutProfitIF LONGONMARKET AND (m1 OR m3) THENSELL AT MARKETENDIFIF SHORTONMARKET AND (m2 OR m4) THENEXITSHORT AT MARKETENDIFSET STOP %LOSS stopLossSET TARGET %PROFIT takeProfitENDIF109/23/2016 at 10:13 PM #1364809/24/2016 at 7:51 AM #1365209/24/2016 at 12:35 PM #1365709/24/2016 at 12:51 PM #13658Miguel, FTSE and DOW is almost ready for V4, I will release it soon. Gold and silver are on my agenda as well. This weekend is sunny weather here in Frankfurt and my family have requested some outdoor activities, so my time is limited on this weekend 🙂
2 users thanked author for this post.
09/24/2016 at 5:05 PM #1366609/25/2016 at 5:54 PM #13714I adapted Pathfinder V4 on FTSE and DOW. Due every index has it’s own “heartbeat” minor adjustments were necessary. Please be aware that this is an optimized view to historic data. Please check the position size and the related drawdown and adjust it to your own risk.
Pathfinder FTSE V4
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167// Pathfinder Trading System based on ProRealTime 10.2// Breakout system triggered by previous daily, weekly and monthly high/low crossings with smart position management// Version 4// Instrument: FTSE mini 4H, 9-22 CET, 2 points spread, account size 10.000 Euro// ProOrder code parameterDEFPARAM CUMULATEORDERS = true // cumulate orders if not turned offDEFPARAM PRELOADBARS = 10000// define intraday trading windowONCE startTime = 90000ONCE endTime = 220000// define instrument signalline with help of multiple smoothed averagesONCE periodFirstMA = 5ONCE periodSecondMA = 10ONCE periodThirdMA = 7// define filter parameterONCE periodLongMA = 200ONCE periodShortMA = 10// define position and money management parameterONCE positionSize = 1ONCE maxPositionSizeLong = 15ONCE maxPositionSizeShort = 10ONCE stopLossLong = 5.25 // in %ONCE stopLossShort = 2.5 // in %ONCE takeProfitLong = 3 // in %ONCE takeProfitShort = 2 // in %ONCE maxCandlesLongWithProfit = 25 // take long profit latest after 25 candlesONCE maxCandlesShortWithProfit = 13 // take short profit latest after 13 candlesONCE maxCandlesLongWithoutProfit = 40 // limit long loss latest after 40 candlesONCE maxCandlesShortWithoutProfit = 25 // limit short loss latest after 25 candles// define saisonal position multiplier >0 - long / <0 - shortONCE January = 3ONCE February = 3ONCE March = 3ONCE April = 2ONCE May = 2ONCE June = 2ONCE July = 3ONCE August = 2ONCE September = -3ONCE October = 2ONCE November = 3ONCE December = 3// calculate daily high/lowdailyHigh = DHigh(1)dailyLow = DLow(1)// calculate weekly high/lowIf DayOfWeek < DayOfWeek[1] thenweeklyHigh = Highest[BarIndex - lastWeekBarIndex](dailyHigh)lastWeekBarIndex = BarIndexENDIF// calculate monthly high/lowIf Month <> Month[1] thenmonthlyHigh = Highest[BarIndex - lastMonthBarIndex](dailyHigh)monthlyLow = Lowest[BarIndex - lastMonthBarIndex](dailyLow)lastMonthBarIndex = BarIndexENDIF// calculate instrument signalline with multiple smoothed averagesfirstMA = WilderAverage[periodFirstMA](close)secondMA = TimeSeriesAverage[periodSecondMA](firstMA)signalline = TimeSeriesAverage[periodThirdMA](secondMA)// trade only in defined trading windowIF Time >= startTime AND Time <= endTime THEN// filter criteria because not every breakout is profitablef1 = close > Average[periodLongMA](close)f2 = close < Average[periodLongMA](close)f3 = close > Average[periodShortMA](close)// saisonal patternIF CurrentMonth = 1 THENsaisonalPatternMultiplier = JanuaryELSIF CurrentMonth = 2 THENsaisonalPatternMultiplier = FebruaryELSIF CurrentMonth = 3 THENsaisonalPatternMultiplier = MarchELSIF CurrentMonth = 4 THENsaisonalPatternMultiplier = AprilELSIF CurrentMonth = 5 THENsaisonalPatternMultiplier = MayELSIF CurrentMonth = 6 THENsaisonalPatternMultiplier = JuneELSIF CurrentMonth = 7 THENsaisonalPatternMultiplier = JulyELSIF CurrentMonth = 8 THENsaisonalPatternMultiplier = AugustELSIF CurrentMonth = 9 THENsaisonalPatternMultiplier = SeptemberELSIF CurrentMonth = 10 THENsaisonalPatternMultiplier = OctoberELSIF CurrentMonth = 11 THENsaisonalPatternMultiplier = NovemberELSIF CurrentMonth = 12 THENsaisonalPatternMultiplier = DecemberENDIF// long position conditionsl1 = signalline CROSSES OVER monthlyHighl2 = signalline CROSSES OVER weeklyHighl3 = signalline CROSSES OVER dailyHighl4 = signalline CROSSES OVER monthlyLow// short position conditionss1 = signalline CROSSES UNDER monthlyHighs2 = signalline CROSSES UNDER dailyLow// long entryIF ( l1 OR l4 OR l2 OR (l3 AND f2) ) THEN // cumulate orders for long tradesIF saisonalPatternMultiplier > 0 THEN // check saisonal booster setup and max position sizeIF (COUNTOFPOSITION + (positionSize * saisonalPatternMultiplier)) <= maxPositionSizeLong THENBUY positionSize * saisonalPatternMultiplier CONTRACT AT MARKETENDIFELSIF saisonalPatternMultiplier <> 0 THENIF (COUNTOFPOSITION + positionSize) <= maxPositionSizeLong THENBUY positionSize CONTRACT AT MARKETENDIFENDIFstopLoss = stopLossLongtakeProfit = takeProfitLongENDIF// short entryIF NOT SHORTONMARKET AND ( (s1 AND f3) OR (s2 AND f1) ) THEN // no cumulation for short tradesIF saisonalPatternMultiplier < 0 THEN // check saisonal booster setup and max position sizeIF (COUNTOFPOSITION + (positionSize * ABS(saisonalPatternMultiplier))) <= maxPositionSizeShort THENSELLSHORT positionSize * ABS(saisonalPatternMultiplier) CONTRACT AT MARKETENDIFELSIF saisonalPatternMultiplier <> 0 THENIF (COUNTOFPOSITION + positionSize) <= maxPositionSizeLong THENSELLSHORT positionSize CONTRACT AT MARKETENDIFENDIFstopLoss = stopLossShorttakeProfit = takeProfitShortENDIF// stop and profit managementposProfit = (((close - positionprice) * pointvalue) * countofposition) / pipsizem1 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithProfitm2 = posProfit > 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithProfitm3 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesLongWithoutProfitm4 = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithoutProfitIF LONGONMARKET AND (m1 OR m3) THENSELL AT MARKETENDIFIF SHORTONMARKET AND (m2 OR m4) THENEXITSHORT AT MARKETENDIFSET STOP %LOSS stopLossSET TARGET %PROFIT takeProfitENDIF1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on