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

  • image.png

  • Posts

    • Source: Coingecko  Source link: https://www.coingecko.com/research/publications/2024-q1-crypto-report The cryptocurrency sector has experienced significant growth in 2024, driven by events like Lugano city's acceptance of crypto payments and the approval of the Bitcoin spot ETF. The industry's market cap reached a record high of $2.9 trillion, with $1.1 trillion added in Q1 alone. Bitcoin surged to a new peak of $73k, surpassing its previous ATH of $68k. Top centralized exchanges like Binance, Bitget, OKX, and Bybit saw substantial growth, with Bitget particularly excelling in derivative trading. Bitget's open interest exceeded OKX's and ranked closely behind Binance and Bybit. Spot trading volume surged from $29B in January to $95B in March, elevating Bitget to the top 7 spot in the spot market and maintaining the 4th position in the derivative market among major centralized exchanges. While other exchanges also witnessed significant growth, Bitget's standout performance has made it the focal point of industry attention. What are your impressions of these findings?
    • DogeDay always brings back memories of 2019 when my friends were diving into Dogecoin and joining farming activities. That's why I'm excited to explore the Bitget DogeDay giveaway event. Plus, with tomorrow's BTC halving, the excitement is doubled!
    • As a meme fan, I have been waiting patiently for the Bull trend that happened to BTC recently to get to all the alts and so we can have what we had back then in 2021 to happen again, but time the strength of the uptrend has not been able to match up with what I am expecting and I do hope that the halving will help, but looking at the hype that is usually expected from the meme community. I don't think I'll be able to wait for the trend to resume and so I am taking more steps ahead of the game, taking up all the opportunities I believe would help the price-trend of my holdings, especially for the DOGE memes and I have found this DOGEDAY event ongoing and it really made a lot of sense to me, because if we look at how the DOGE coins have performed in the past. I believe if we can have a Bitcoin day to celebrate the first cryptocurrency, then we should be able to have a DOGEDAY too looking at the success rate of the meme and the support from the community. For me, this is something special that is worth the energy, vibes and hype and worth participating it. There are different sections to the event, which include the Twitter part, where Bitget is sharing $3,00 to those participating( https://twitter.com/bitgetglobal/status/1780495739984150962Twitter Post ) and the telegram event, and I believe this will favour those that love to bet on the price of coins. They are sharing 100BGB tokens for this and the Discord event has a 90BGB token to be shared.  If we can have Bitcoin's day, then this DOGEDAY should be observed in all the DOGE communities and I will admonish meme lovers to observe events like this because it reflects the nature of memecoin and the hype around it.
×
×
  • Create New...
us