[HOW TO] Create a great trading setup
I've been creating, backtesting and forwardtesting a lot of trading setups these past few months, i tend to follow the same process every time and it has helped me get interesting results
In this article i'm going through all the steps with an actual example
1. Setup creation
First things first, you need to create your
setup, before testing it.
I usually go through an iterative process,
starting with an initial idea, it might be a
specific event in the market, or some market
conditions i'd like to study and then i try
to progressively refine my initial idea
until i get something that looks good.
By something that looks good, i mean a setup
where's something you can predict in a
reliable way. When price does X, then price
does Y
But you also need to take into account a few
other parameters, as predicting price path
isn't always enough. These parameters would
be the.
- Risk/Reward: Is the move gonna be significant enough (for the risk i take)
- Win rate: What's the probability of a winning trade
- Profit: what's the expected value given the RR and the win rate
1.1 initial idea
When trying to find new setups, i like to either start with a specific market event, say a big candle with high volume, or with some market conditions, a range for example, and then try to find some patterns that repeat.
1.1.1 important market elements, events & phases
Here's a list of things that can make for a good starting point
Market Events:- high / lows
- market structure
- support/resistance levels
- FVG, Poc, nPoc
- large candle or high volume
- compression, expansion
- break, sweep, deviation, retest of market elements
- range/consolidation
- trend up / down
Obviously enough, the goal is to find an edge, meaning you need to find some patterns of price action that keep repeating so that next time it happens, you know how to trade it
I usually start by creating a very basic setup with my initial idea, i run a test and then i just look at the chart to make some observations that will help refining the idea
[EXAMPLE]
Here's an example where i'm gonna try to
find something interesting by looking at
resistances
I'm starting with resistances with at
least 3 highs.
Here's what the code looks like
Here's the results on BTC/USDT, 15m timeframe
1.2 iterative process: test & refine idea
Now the goal is to build upon this first idea and iteratively tweak the setup to get the best result.
When you're creating a setup, you usually test your idea over a few months' worth of data. Obviously you won't be able to see all the occurrences so you need to build the strongest setup possible.
One thing to keep in mind, is that you're gonna need a minimum number of samples for your backtest. The more samples, the more confidence you'll have in your backtests.
That means you can't be too restrictive when tweaking your setups, you still need to find a minimum number of occurrences.
Keeping that in mind, i usually try first to get rid of the setups that don't fit my setup. If i'm trying to build short at resistance zones, i'm gonna need to filter the setups that don't lead to a dump.
Then you can either try to optimize the Risk/Reward or the win rate. There's no free lunch, and optimizing for both is like trying to find a unicorn
Trying to optimize the win rate usually means you're taking less risk, which means you're probably trying to get less profit per trade. That probably translates into a wider stop loss for example.
Trying to optimize the risk/reward means you're looking for big trades or trades with tight stop losses. When you using tight stop losses, you obviously gonna hit these SL more often, that will lower your win rate. The goal here to make large profits when your trade is a win.
- Is there a pattern that keeps repeating every time ? price goes up or price goes down, or price retests then goes ...
- Should i try to tweak the parameters to exclude some occurences that don't seem to fit ? maybe look at resistances with more points, candles with higher volumes ...
- Should i try to study these events in some specific contexts only ? study the event when it happens after a pump, after a dump, during a consolidation...
1.2.1 tweak parameters / add conditions
Refining the idea basically means trying
to optimize one or more parameters.
You can try to get a better RR, a better
win rate, more samples ...
[EXAMPLE]
Looking at the previous results, a few observations:
- To be honest, this doesn't look bad for a first draft.
- This setups tends to happen either after a bottom, when price is consolidating below a resistance, or after a move up when price struggles to keep the momentum up
- Price moves dump when this setup occurs after a significant move up, sometimes right away, sometimes there's a move down before a retest setting the stage for a bigger move down
Optimization ideas
- Get rid of setups at the bottoms. I could try to use EMAs to check if it's more likely to be at a bottom or a top
- handle retests or create two setups, one for the immediate dump and another one to handle the retest
To avoid setups at the bottoms,
i'm trying to exclude setups
that start on a lower LTL. These
lower LTLs would probably mostly
be found at the bottoms
This code could do the trick: not(ltl(isLowerLtl()))
This trick seems to be working, the setup between the 13th and 14th is excluded now for example. That might not be optimal as it could other valid setups but this seems good enough for now
I also tried to filter the setups based on an EMA condition, for example, i only keep the setups where the price ends up > EMA 100: aboveEma(ema1(100))