Bitcoin
Education

60k Backtests Origin Story - Analyze Trades w/ Regime Filters

266
I remember when I first dove into TradingView in 2017, all I could think about was automated trading, it would be like growing money on trees...I had all kinds of crazy ideas and what did I do? I searched indicators, found some cool ones and like Dr. Frankenstein started copy/pasting all sorts of pieces together in experimentation for the possibility of building my own money printer.

Man, my dreams got slapped down HARD and fast. Automated strategies are extremely difficult, yet there is always edge to discover, test and deploy. I've probably performed over 60-70k backtests over the years and can have up to a dozen strategies running at any given time. Most just forward testing and only 2-3 trading live….It has been an endless exploration of indicators, strategies and backtesting to discover a meaningful edge that has resulted in the creation of some unique interpretations and expressions of the plethora of data available to us all.

Originally I started building a Python-only ecosystem in 2018 with a programmer friend, however the sheer volume of data and ability to backtest in the TradingView ecosystem, paired with visualizations made it a no brainer to pivot to Pine Script, and have been using webhooks for strategies ever since. The results facilitated the continuation of a lifestyle focused on living life while the nuance of trading wasn’t so burdensome.

Everything I published, I have and continue to use in an automated strategy in a strategic way. The Automate ST strategy template (free on my profile) shows how to build your own strategy without having to build the entire architecture. It allows you to focus on generating your entries while everything else is handled in the most disciplined means of trading; as it should. The indicators like ROC Regime or Multi-Factor Regime can build conviction in taking a trade or provide insight that the strategy is not displaying often showing, that’s a bad trade…

My secret hope is that savvy traders can pick up on what I am sharing here, they could copy it, evolve it but more importantly drop it into their own strategy or indicator and gain an edge if used correctly.

That is the real reason behind publishing all these indicators and the strategy template. Each one is a variable I use in automated strategies and the code is right there for the taking. With ideas here, I plan to show exactly this, how using each and every one of my published indicators can be used as a confirmation, a filter or unique way in creating signals, confirming them or filtering them.

So why start publishing now?
Never been one for the social media thing, not one for trying to build followers or feel important…have been solely interested in profitability and automating it so I can live my simple surf life out here in the jungle and by the beach. I used Binance and third-party middleware for webhook execution. I bounced around different middleware because everything out there is a real pain…and I was never comfortable with Binance having control over the assets or that they could lock me out for any reason. I have a soft spot for on-chain cypherpunk ecosystems. I've been trading deep in the on-chain trenches for years, eating heavy slippage and fees just to stay off CEXs and the disasters that can happen and of course, "not your keys, not your coins."

In addition, I followed what everyone told me to do, don't share your edge, if it works, just use it...and I did exactly that until three realities converged. Hyperliquid shook things up on-chain, legit AI came along, and at the same time my cushion in life expanded. So with these three new realities intersecting and my new "super coder powers", I discovered I could do it all myself, own it all, nobody in the middle, do it better and it's been so much fun to dream and build again.

So why start publishing now? Because for the first time, everything aligned. The ecosystem I actually want to trade on exists. I have the tools to build without depending on anyone. My cushion means protecting the edge matters less than it used to. And honestly, knowing how to combine them, weight them, and build discipline around them is the real edge. Sharing the variables and insights costs me nothing and it feels good to contribute and start giving back. If someone picks this up and figures out something I haven't, that's a big win.

I was that person in 2017 copy-pasting indicators together hoping something would click. I know exactly what it's like to search for a framework that doesn't exist yet. Now I have one. Seemed like the right time to put it out there with insights and lessons learned.

ANALYSIS OF TRADES
The “Automate ST “ strategy published in my profile does not employ ROC Regime or Regime Factor. It is a good candidate to compare the trades it takes with these indicators and how they confirm or negate the trades that we can now see were good or bad in hindsight. Notice there are vertical lines in two key locations that span top to bottom, these are phase transitions of ROC Regime. There are 4 trades identified numerically reviewed below.

Trade 1 - tL turtle breakout Long stops out quickly.
1. ROC Regime phase transition from red to yellow is signaling it's too early for a long, the strategy took the trade, but it's not using ROC Regime as a filter…If it did, it wouldn't take the trade because we know this is a no go zone for longs. In a confirmed structural downtrend, longs need to base out and accumulate, transition from yellow to orange, and orange is the go long zone.
2. Regime Factor = -.16 in sweet-spot coming from a sustained period of time below -.6, signaling worth a starter position. it stoped out but worth the punt compared to the previous long attempts that where clearly in downtrend with momentum.

Trade 2 - xuS and pyrS - XU 9/26 ma and a quick pyramid that goes on a run.
1. ROC Regime green to yellow phase transition (BIG Green dot on zero line), that's prime time for shorts. Swing shorts move quicker and do not base like longs. In addition ROC rejected the zero line, high conviction short. The strategy did a good job pyramiding on the momentum.
2. Regime Factor = -.09, in sweet-spot. Important to note, is how it got there, after a sustained period of 13 bars above .6. Similar to trade 1, but this time it has the ROC Regime phase transition on it's side.

Trade 3 - tL + pyrL turtle breakout Long with pyramid stops out
1. Again, the long is taken too early in the yellow zone before enough accumulation and basing has built. You can see the long downtrend, base of accumulation is needed for reversing the trend.
2. Regime Factor = -0.2 in the sweet-spot and a long divergence to price action signaling that longs and early positions are worth considering. However, it had been floating in and out of the sweet-spot and we would rather see the Regime Factor come from at least the -.6 zone to fully warrant a trade.

Trade 4 - sfpL - Will it stick or no?
1. ROC Regime is in the orange area indicating accumulation and basing have occurred after a long downtrend. However, it already tried to XO the zero line and rejected. The original accumulation didn't have enough juice, this trade most likely will fail.
2. SFPs rarely occur in the sweet-spot of Regime Factor, it's value here is -.63 and followed by a weak bounce that doesn't gain momentum and take the Regime Factor to the other side above .6. It's best to close the trade and wait for a better set-up.

In order to codify these interpretations the ROC Regime indicator has a color coded map/legend in the description to the variables that dictate what is being visualized on the chart, and the built in alerts cover the basics of these concepts. If one was motivated, simply copy the code from ROC Regime, paste it into Automate ST strategy template and start filtering the signals with conditional logic to hopefully discover an edge of your own.
Note
Contrary to the analysis on the sfpL using the ROC Regime Filter and the Regime Factor, it played out an 8% move to the upside before reverting again on another swing failure pattern sfpS. The trade would fail more often than it would succeed in the conditions identified, but this time it worked.

As we all know in trading, the setup can be perfect, the analysis robust, and the trade still goes against you. In this case nothing was lost, which is always a win. But it shines a spotlight on a fundamental aspect of trading most everyone overlooks.

In trading, you only win long term when your average ratio of wins to losses over your history is greater than 1. This means you have to keep taking the trades, size accordingly and let them play out. The analysis was wrong because it said to close the position. The real lesson is that if the position was sized relative to risk profile, volatility and account balance upfront, it would have been a fairly small position; worth keeping on and rolling the dice with risk managed.

We only win over the long term by taking repeatable setups, managing risk relative to the stops chosen and sizing the trade accordingly across a large set of trades.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.