Jump to content

Andrew's Pitchfork Trading Strategy


Recommended Posts

Hi everyone, 

so, those of you following my FTSE - Daily Trades thread may know, I'm looking for new strategies to tackle the market.

Was starting to think about this today and made a few thoughts.

First one I came up with in the process is the following and utilises 'Andrew's Pitchfork' a rather odd name for a simple principle.

 

Thought Process
I was going back to the basics and starting to think about the fundamentals of trading: Buy low and sell high. Or go short high, and buy back low later.
So the key of my new strategy has to somewhat depended on these fundamental trading principles.

Next I was thinking, looking at a chart, in what region can the price considered to be "low" and in what region would I consider it to be "high".
I was looking at a 5min chart and looking at the whole day.
I was drawing one line at the low of day, one line at the high of day, those are obviously the extremes where everyone can agree prices are low / high.
Then I draw a line right in the middle between the two, where the price is neither high nor low.
Then I draw a line at 25% and one at 75% and said, if the price is between the low of day (0%) and 25%, I consider the price to be low. If the price is between 75% and high of day (100%) I consider the price to be high. In between (25%-75%), it's neither high nor low.
If I'd somehow manage to always buy in the low range and sell in the high range (or go short vice versa), then this could be a decent strategy.

The next problem I was facing is, I've done this analysis on the previous day, where we know high and low of day. How can this strategy work out for future price movements, where high and low of day are unknown.

Andrew's Pitchfork
This is where the Pitchfork comes in.
The assumption I'm making is that if I extrapolate the 4 required levels (low of day, high of day, 25% and 75%) from the previous day to the following day, the strategy still works. This is because more often than not, prices move up and down around a certain level, without breaking away from it and moving onto the next level. (This obviously has to be proven with data - more to that later)
The way the pitchfork works is exactly how the 4 required levels are drawn up. The pitchfork is defined over 3 points: High, Low and Mid-point. It then draws 5 levels on the chart: High (100%), 75%, Mid (50%), 25%, Low (0%)

So how does it work
The way I imagine it to work is the following:

1) Identify previous day's high and low

2) Draw the pitchfork in the chart with aligning its high and lows on the daily high and low. The mid point is exactly in the middle of daily high and low. This draws a horizontal pitchfork in the chart.

3) When the price of the asset falls below 25%, place a buy stop order at the 25% level. Once the price rises again and breaks through that level, the order gets executed. (vice versa with shorting above the 75% level)

4) Stop Loss is right below (size of the spread) the low of the pitchfork. Target is somewhere above 50%-75%. You have at least a 1:1 risk-to-reward ratio. Need to calculate target level by asset based on historic patterns.

Does it work?
Don't know yet. So far I've manually painted a few of those pitchforks in the chart for the past couple of days on FTSE100, NASDAQ, CL and NG and it seems it works more often than it doesn't.
Cases where it clearly doesn't work is when there's a strong move to either direction, aka price breaks-out and moves to a different level than it was the day before. Interestingly when this happens, the strategy wouldn't necessarily always result in a loss, but sometimes the entry conditions would never be triggered in the first place. E.g. if we start the day already in the high region (above 75%) and then never fall below it - no order triggered on that day.
On the negative side, huge breakout opportunities are missed with this strategy, so worth looking into a complementary strategy which works specifically for break-outs.

Next steps
Next, I'm trying to backtest the strategy. Will need to pull a whole lot of data and analyse. Hope to have that done over the weekend. Will update the thread accordingly.
Data I'm trying to get: Win ratio, Where's the optimum take profit level, Time of day where this usually plays out (my idea is to hook this in with the ATR analysis I've done and trade this pattern at times of high ATR, aka FTSE, DAX in the morning, NASDAQ, NG, CL in the afternoon) 

First success
First successful example trade taken this afternoon on CL.
You see nicely how the pitchfork is drawn on the chart and is derived by the high and low of the previous day.
At 14.30 today the price dipped below the 25% level. I set the buy stop order at the 25% level, which got triggered at 14.35. The price afterwards makes a sweep move up to the 50% level, where my limit sell order gets triggered at 15.15. It would've been possible to play it up until the 75% level, but wanted to be safe, without having the data yet.
Could've been luck - who knows.

 

What do you think of this approach?

 

image.thumb.png.3d38406536cc114b0fd420827cce8cd1.png

 

 

 

  • Like 2
Link to comment
4 hours ago, DSchenk said:

Hi everyone, 

so, those of you following my FTSE - Daily Trades thread may know, I'm looking for new strategies to tackle the market.

Was starting to think about this today and made a few thoughts.

First one I came up with in the process is the following and utilises 'Andrew's Pitchfork' a rather odd name for a simple principle.

 

Thought Process
I was going back to the basics and starting to think about the fundamentals of trading: Buy low and sell high. Or go short high, and buy back low later.
So the key of my new strategy has to somewhat depended on these fundamental trading principles.

Next I was thinking, looking at a chart, in what region can the price considered to be "low" and in what region would I consider it to be "high".
I was looking at a 5min chart and looking at the whole day.
I was drawing one line at the low of day, one line at the high of day, those are obviously the extremes where everyone can agree prices are low / high.
Then I draw a line right in the middle between the two, where the price is neither high nor low.
Then I draw a line at 25% and one at 75% and said, if the price is between the low of day (0%) and 25%, I consider the price to be low. If the price is between 75% and high of day (100%) I consider the price to be high. In between (25%-75%), it's neither high nor low.
If I'd somehow manage to always buy in the low range and sell in the high range (or go short vice versa), then this could be a decent strategy.

The next problem I was facing is, I've done this analysis on the previous day, where we know high and low of day. How can this strategy work out for future price movements, where high and low of day are unknown.

Andrew's Pitchfork
This is where the Pitchfork comes in.
The assumption I'm making is that if I extrapolate the 4 required levels (low of day, high of day, 25% and 75%) from the previous day to the following day, the strategy still works. This is because more often than not, prices move up and down around a certain level, without breaking away from it and moving onto the next level. (This obviously has to be proven with data - more to that later)
The way the pitchfork works is exactly how the 4 required levels are drawn up. The pitchfork is defined over 3 points: High, Low and Mid-point. It then draws 5 levels on the chart: High (100%), 75%, Mid (50%), 25%, Low (0%)

So how does it work
The way I imagine it to work is the following:

1) Identify previous day's high and low

2) Draw the pitchfork in the chart with aligning its high and lows on the daily high and low. The mid point is exactly in the middle of daily high and low. This draws a horizontal pitchfork in the chart.

3) When the price of the asset falls below 25%, place a buy stop order at the 25% level. Once the price rises again and breaks through that level, the order gets executed. (vice versa with shorting above the 75% level)

4) Stop Loss is right below (size of the spread) the low of the pitchfork. Target is somewhere above 50%-75%. You have at least a 1:1 risk-to-reward ratio. Need to calculate target level by asset based on historic patterns.

Does it work?
Don't know yet. So far I've manually painted a few of those pitchforks in the chart for the past couple of days on FTSE100, NASDAQ, CL and NG and it seems it works more often than it doesn't.
Cases where it clearly doesn't work is when there's a strong move to either direction, aka price breaks-out and moves to a different level than it was the day before. Interestingly when this happens, the strategy wouldn't necessarily always result in a loss, but sometimes the entry conditions would never be triggered in the first place. E.g. if we start the day already in the high region (above 75%) and then never fall below it - no order triggered on that day.
On the negative side, huge breakout opportunities are missed with this strategy, so worth looking into a complementary strategy which works specifically for break-outs.

Next steps
Next, I'm trying to backtest the strategy. Will need to pull a whole lot of data and analyse. Hope to have that done over the weekend. Will update the thread accordingly.
Data I'm trying to get: Win ratio, Where's the optimum take profit level, Time of day where this usually plays out (my idea is to hook this in with the ATR analysis I've done and trade this pattern at times of high ATR, aka FTSE, DAX in the morning, NASDAQ, NG, CL in the afternoon) 

First success
First successful example trade taken this afternoon on CL.
You see nicely how the pitchfork is drawn on the chart and is derived by the high and low of the previous day.
At 14.30 today the price dipped below the 25% level. I set the buy stop order at the 25% level, which got triggered at 14.35. The price afterwards makes a sweep move up to the 50% level, where my limit sell order gets triggered at 15.15. It would've been possible to play it up until the 75% level, but wanted to be safe, without having the data yet.
Could've been luck - who knows.

 

What do you think of this approach?

 

image.thumb.png.3d38406536cc114b0fd420827cce8cd1.png

 

 

 

you seem to set a good set of rules, but I have always found forks a little subjective, even personal. Different people see different ones. Here's mine

Capture fork.PNG

  • Like 1
Link to comment
Guest Trader Martino

Forget the charts , trade price from a Macro Economic Outlook over a longer period , build a Long Short portfolio less stress more money.....

Link to comment
17 hours ago, elle said:

you seem to set a good set of rules, but I have always found forks a little subjective, even personal. Different people see different ones. Here's mine

Yeah, the fork is not the main criteria here, it's just a helper to define entry and exit points.

I'm currently backtesting different entry/exit points to see what works best (at least historically).

Link to comment
4 hours ago, Guest Trader Martino said:

Forget the charts , trade price from a Macro Economic Outlook over a longer period , build a Long Short portfolio less stress more money.....

That's something also professional traders aka Anton Kreil always say.

The question is, how would you approach a strategy which is based purely on macro economics?

I also doubt you make more money with this approach, but yes you have probably less stress.
As markets don't move in a straight line, but go up and down, the one who capitalises on each up and down turn should make more than the one who just holds through.

Link to comment
13 minutes ago, DSchenk said:

Yeah, the fork is not the main criteria here, it's just a helper to define entry and exit points.

I'm currently backtesting different entry/exit points to see what works best (at least historically).

Very interesting idea. What software are you using to backtest it?

I'm also keen to backtest it, I've built a crude system for backtesting using the IG Index API, I'm tempted to tweak it to test this idea! Will report back here with results if/when I get it up and running.

Link to comment
2 minutes ago, andysinclair said:

What software are you using to backtest it?

Using ProRealTime at the moment

But also though first using the API. The backtest functionality of PRT is not too bad though, as you can run through variables up until 10,000 combinations.
Currently running through different combinations of TP, SL and entry points

Link to comment
19 hours ago, elle said:

Be careful with only looking at fundamentals, is what the video wants to tell, I guess

Someone else once said (can't quite remember who - think it was a quant fund manager): The market can behave longer irrational than you have equity to be in it.

Meaning, all the fundamentals point towards this company is to go bust, you go short, but the share price keeps rising until you receive your margin call and get pulled out of the trade. Afterwards the company goes bust.

Consequently this means, timing is more important than getting the overall direction right. And that in return means, technical analysis is more important than fundamentals.

Link to comment

Ok, I've got some initial results from backtesting this strategy on FTSE 100.

I was backtesting over 100,000 5min untits, that's the maximum PRT can do. It's a timeframe of approx. 1 year and a quarter.

High Level Results are:

Gain: 130%

Winning trades: 60%

So, promising results at first glance, but obviously way below expectations. In order for this to be a successful strategy, we would need a gain of something more in the area of 1200% over that timeframe.

Not saying this strategy can't achieve this though, if we find a way to tweak it accordingly. Couple of issues to iron out:

1) In the first 3 months it doesn't seem to make any profits at all. Need to find out why this is the case and how the strategy can be tweaked.

2) Then between Nov 18 and Sep 19 the strategy seems to be largely flat as well. Need to investigate this as well

3) Position sizing is currently set as a constant, this needs to be turned into a formula to make the strategy scalable, but couldn't figure out so far how it's best to approach this

4) There are entire months where this strategy produces a loss - need to figure out why and how to avoid

 

Btw, there are two parameters which I did let PRT optimise:

1) Target Profit: Result was that the TP level is optimal if it is set 10 points behind the mid level (50% level). So e.g. when entered long at the 25% level, then the price moves up and crosses the mid level and then makes another 10 points before profits are taken

2) Stop Loss. This is interesting. The optimisation concluded that the TP level is 65 points below the 0% level (or 65 points above the 100% level when shorting). This seems to be a large divergence, which makes me think the strategy itself needs further tweaking. Maybe taking high and low of previous day is not the optimal, but we need to build a range of previous x days and draw the fork over that.

 

Will keep looking at this and update the thread accordingly.

image.thumb.png.3783aafce1e9bae0a860588fe3db2a3f.png

 

image.thumb.png.35b942e0c9f1f8b9c4055b683bf73f20.png

Edited by DSchenk
Link to comment

Ok, so I took this approach to the next level.

Rather than telling the algorithm enter long at 25% and enter short at 75% levels, I decided to let the algorithm decide itself at what levels its best to enter short or long.

This simplifies the strategy and boosts its gains dramatically.

Top level stats over 100,000 5min candles:

Gain: +1,307%

% of winning trades: 60%

Starting with a £2000 account, after 1 year and 1 quarter that account would have grown to almost £30k (£28k).

The equity curve looks also a lot more stable, too.
I resolved the issue with the lot size, this is now a formula.
Unfortunately we still have 3 negative months, but overall the max runup is a lot higher than the max drawdown.

Overall time in market is only 20%, so there should be the opportunity to run multiple of this strategy on different assets simultaneously to further boost the return. If let's say 3 of these programs could run simultaneously and deliver similar results you could grow £2000 to £100k within about 18 months. Still not as good as the results of the few world-class top traders like Ross Cameron from Warrior Trading, etc but a start nonetheless.

The variables which the program optimised are the following:

  • Take Profit for Long Positions: 84 points
  • Take Profit for Short Positions: 70 Points
  • Entry LvL for Long Positions: 23 Points below the low of previous day
  • Entry LvL for Short Positions: 7 Points below the high of previous day

Interestingly, it turned out the strategy works best without a set stop-loss, but just to close out any open positions at 21.00 o'clock at night, if not already closed by the take profit rule.

I'm gonna simulate this on NASDAQ next. Obviously will need to find out the 4 variables again, as these will be subject to the Index where this is traded.

 

What do you guys think? Worth a shot this strategy?

 

image.thumb.png.74be91645ee513cee6bfc5a8401a5fe8.png

image.thumb.png.b41c0e8f406101efe10577462fdf1f90.png

Link to comment

Hello,

I am new to pro real time and I am very interested in your strategy, I've tried but so far have failed to implement your strategy on my own pro real time platform. Can you help me with how I could add this and would this trading strategy for all stocks and indices?

Thank you,

E.

Edited by EugeneB
Link to comment
17 hours ago, EugeneB said:

Hello,

I am new to pro real time and I am very interested in your strategy, I've tried but so far have failed to implement your strategy on my own pro real time platform. Can you help me with how I could add this and would this trading strategy for all stocks and indices?

Thank you,

E.

Hi @EugeneB,

shoot me your questions.

This strategy would only work for indices (I believe at this moment - cause stocks move to irregular) and the 4 parameters (TPL, TPS, Entry L, Entry S) need to be assessed for each index individually.

I'm going to model this for NASDAQ and DAX next and also gonna look at commodities like NG and CL.

Link to comment

FTSE 100 today. (I didn't trade it btw, cause all my margin was tied up in Prudential)

Black line is the previous high of day (I call that L100, for Lvl 100%).
Red line would be the entry level of L100 - 7 points.

According to the strategy, take profit level would be 70 points below the entry level, which is too far away for my taste. Time in market needs to be reduced as much as possible.

I'm looking to optimise the strategy for a smaller take profit level. Looking at the chart today, something like 40 points would've been ideal for a 20min trade.

image.thumb.png.8e4480f713e82fbb2ae4f9354afbeced.png

Link to comment

Alright. Got you.
Code is below.

Variables need to be set for FTSE to

  • X = -23
  • y = 7
  • TPL = 84
  • TPS = 70
Quote

// Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
DEFPARAM FLATAFTER = 210000

// Prevents the system from creating new orders to enter the market or increase position size before the specified time
noEntryBeforeTime = 080000
timeEnterBefore = time >= noEntryBeforeTime

// Prevents the system from placing new orders to enter the market or increase position size after the specified time
noEntryAfterTime = 160000
timeEnterAfter = time < noEntryAfterTime

// Prevents the system from placing new orders on specified days of the week
daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0

size = (2000/400) + ROUND(STRATEGYPROFIT / 800)

// Levels 0% and 100%
if OpendayofWeek <> 1 then
L0 = DLow(1)
L100 = DHigh(1)
elsif OpendayofWeek = 1 then
L0 = DLow(2)
L100 = DHigh(2)
Endif
GRAPHONPRICE L0
GRAPHONPRICE L0 + x COLOURED (200,0,0)
GRAPHONPRICE L100
GRAPHONPRICE L100 - y COLOURED (200,0,0)

// Conditions to enter long positions
c1 = high crosses over L0 + x
//c12 = close > L25-5

IF c1 AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THEN
BUY size PERPOINT AT MARKET
SET TARGET PPROFIT TPL
//SET STOP PLOSS SL
ENDIF

// Conditions to enter shortpositions
c3 = low crosses under L100 - y
//c32 = close < L75+5

IF c3 AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THEN
SELLSHORT size PERPOINT AT MARKET
SET TARGET PPROFIT TPS
//SET STOP PLOSS SL
ENDIF

 

Link to comment

Thank you @DSchenk!

I've entered the code on to the platform and seems to work, however on the ftse100 it seems to only work on the 5minute intervals and only 1 trade occured. Have I somehow messed up the code? if so could you please assist me. Thank you so much for sharing great information by the way, it means a lot!

E.

Link to comment

// Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
DEFPARAM FLATAFTER = 210000

// Prevents the system from creating new orders to enter the market or increase position size before the specified time
noEntryBeforeTime = 080000
timeEnterBefore = time >= noEntryBeforeTime

// Prevents the system from placing new orders to enter the market or increase position size after the specified time
noEntryAfterTime = 160000
timeEnterAfter = time < noEntryAfterTime

// Prevents the system from placing new orders on specified days of the week
daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0

size = (2000/400) + ROUND(STRATEGYPROFIT / 800)

// Levels 0% and 100%
if OpendayofWeek <> 1 then
L0 = DLow(1)
L100 = DHigh(1)
elsif OpendayofWeek = 1 then
L0 = DLow(2)
L100 = DHigh(2)
Endif
GRAPHONPRICE L0
GRAPHONPRICE L0 + -23 COLOURED (200,0,0)
GRAPHONPRICE L100
GRAPHONPRICE L100 - 7 COLOURED (200,0,0)

// Conditions to enter long positions
c1 = high crosses over L0 + -23
//c12 = close > L25-5

IF c1 AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THEN
BUY size PERPOINT AT MARKET
SET TARGET PPROFIT 84
//SET STOP PLOSS SL
ENDIF

// Conditions to enter shortpositions
c3 = low crosses under L100 - 7
//c32 = close < L75+5

IF c3 AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THEN
SELLSHORT size PERPOINT AT MARKET
SET TARGET PPROFIT 70
//SET STOP PLOSS SL
ENDIF
 

Link to comment

Was able to optimise the strategy a little more for FTSE 100.

Managed to work with smaller TP levels, which led to a reduction of time in market. Also % of winning trades went up.

Optimised the entry condition a bit more as well, now working with stop orders not market orders.

New stats:

Gain: 1380% (+73% vs previous run)

% of winning trades: 64% (+4% vs previous run)

Time in market: 18% (-2% vs previous run)

image.thumb.png.fdd3e1870e7499feb720428f8cdef622.png

 

Would've turned out marvellously for today btw. Hit perfectly the high and low candle of this move.

image.png.c0ba53d94b87cb4416178507e44fb051.png

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • General Statistics

    • Total Topics
      20,147
    • Total Posts
      88,272
    • Total Members
      69,129
    • Most Online
      7,522
      10/06/21 10:53

    Newest Member
    Psouthby
    Joined 07/10/22 05:36
  • Posts

    • We are moving into ‘nonfarm payrolls Friday’ and the potential for volatility is significant after a broad mix of preceding employment statistics. While the employment report can certainly spur the markets like the S&P 500 and Dollar to action, traders should keep tabs on growing warnings from the IMF and Fed officials.   Full article on DailyFX  
    • United Parcel Service Inc., Elliott Wave Technical Analysis United Parcel Service Inc.,  (UPS:NYSE): Daily Chart, October 7 2022,   UPS Stock Market Analysis: Moving as expected, we are looking for further downside with at least one more move down.   UPS Elliott Wave count:  (iv) of {c} UPS Technical Indicators: We are below all averages UPS Trading Strategy: Looking to short on wave (iv) to potentially target equality of {a} and {c} at 148$. TradingLounge Analyst: Alessio Barretta Source Tradinglounge.com Get trial here!       United Parcel Service Inc.,  UPS: 4-hour Chart, October 7 2022   United Parcel Service Inc.,  Elliott Wave Technical Analysis UPS Stock Market Analysis: The subwaves are pretty clear which gives us additional confirmation. Looking for further downside and potentially a sideways wave (iv) alternating with wave (ii). UPS Elliott Wave count:  Wave (iv) of {c}. UPS Technical Indicators: We are using the 20EMA as resistance as well we are starting to form RSI divergence. UPS Trading Strategy: : Looking to short on wave (iv).  
    • FTSE 100, DAX 40 and Nasdaq 100 stall ahead of US jobless data Outlook on FTSE 100, DAX 40 and Nasdaq 100 ahead of US Non-Farm Payroll data which may influence the US Federal Reserve’s (Fed) monetary policy going forward. Source: Bloomberg   Indices Federal Reserve United States Monetary policy DAX FTSE 100  Axel Rudolph | Market Analyst, London | Publication date: Friday 07 October 2022  FTSE 100 rally taking a breather The FTSE 100 is retracing lower ahead of the widely anticipated US non-farm payroll (NFP) data which may influence the Federal Reserve’s (Fed) monetary policy going forward. The index has so far rallied by over 4% from its September low on the back of hopes of a slowing tightening path by the Fed after softer US economic data earlier in the week but ran out of steam slightly above the 7,100 mark. The June low at 6,966 may be revisited. Below it sits further minor support in the 6,945 to 6,934 region, made up of the 26,27 September lows and the 3 October high. A bullish reversal and rise above this week’s high at 7,104 would likely engage the early September low at 7,131 as well as the 8 September low at 7,174. Source: ProRealTime DAX 40 slips ahead of US unemployment data The DAX 40’s swift ascent on hopes of a slowdown in the speed and size of global rate hikes following the Reserve Bank of Australia’s (RBA) lower than expected 25 basis point rate rise on Tuesday is taking a breather ahead of Friday’s US unemployment data. Following the contract’s technical bear trap, in which it dipped below its key March to July support at 12,386 to 12,432, only to then rally by over 7% to 12,704 before slightly coming off again, led it to revisit the 12,386 July low. Between this level and the 3 October high at 12,275 the DAX 40 may find support, however. If not, a slide towards the 30 September high at 12,138 may be witnessed. Immediate resistance comes in at the 12,596 early September low above which lie the 23 June low at 12,839, followed by the mid-June low and 20 September high at 12,940 to 12,944. The next higher 26 July low, 2 September high and 55-day simple moving average (SMA) at 13,021 to 13,066 may still be reached in the days and weeks to come, provided that no drop below the September low at 11,810 ensues. Source: ProRealTime Nasdaq 100 rally stalls ahead of US Non-Farm Payroll data The Nasdaq 100’s near 7% rally from its September low has given way to some profit taking ahead of Friday’s US jobless data which should give clues as to the direction the Fed will take with regards to its monetary policy. Throughout this week various Fed officials have continued to pour cold water on the idea of a pivot, suggesting that there is little likelihood of a change in policy due to the persistence of high inflation. This has led to the Nasdaq 100 giving back some of its recent strong gains and it slipping towards the 11,306 low seen on Wednesday. A rise above this week’s 11,668 high would put the early September low at 11,918 on the cards. Source: ProRealTime
×
×
  • Create New...