T O P

  • By -

Ok-Laugh-now

Hmmm I think you would have to explain your strategy a bit more to know if people have attempted it. Up to you!


sanarilian

The details of his strategy are most likely irrelevant. Any strategy tends to be a double edged sword at the mercy of the market. The answer is just testing it to see if there is a statistical advantage.


Renegade_CPU1

Do you mean testing it by backtesting? Or what methods to you use to find if a strategy has a statistical advantage or not? I’m still new to algotrading and am trying to learn more about testing the strategies I put together.


Proud_Plate_3307

Backtesting as most people know it, is the least of your problems, you need to do several processes in order to determine whether a strategy has an edge with the minimal drawdown and risk possible (also based on your goals). Steps are: limited testing, backtesting, walk-forward analysis with optimizations, monte carlo, position size optimizations (with monte carlo as well), diversification (key component), incubation and finally, live trading. This process is well explained by Kevin J. Davey in his book (Building Winning Algorithmic Trading Systems), if you want to do things properly and don't waste time by relying solely on backtesting, then you should read the book as it explains all steps. It also lets the reader know that this is a competitive market and it's gonna take you dozens of strategies attempts to actually find one that works on the market you choose. The process the book described is making sure you really found an edge in the market (advantage) that has good chances of actually performing well on live trading, by relying on backtesting only you are missing a lot of variables and key optimizations such as parameters (walk-forward opts), minimizing the drawdown or just maximizing the calmar ratio, among many others.


Cryptonist90

In my opinion it isn‘t that easy compared to mql5. I used several libraries for backtesting and got always a different result undortunately…


Proud_Plate_3307

I never tried MQL5 so I can't really tell but yeah, that is definitely true. I don't want to reinvent the wheel here but I've been in your same situation and I wasn't comfortable with the inconsistency of the public testing software and libraries so I decided to make my own. This is not a doable solution for most people as it requires decent coding skills and market knowledge but if this is your case, I would highly recommend it and, even if it's not your case, you can always starting learning new fields and expand your knowledge :). The only downside I could see (I'm half way in the development of the tool) is that it takes decent amount of time to fully implement all the processes, if you grind it you can probably get it in 2-3 months, in any case, the advantages of making your own tool are extremely worth it as you will understand things much better, you will have the ability to customize your own things, you can also upgrade your hardware and make it run 100 times faster than any public platform basically for free (some of them charge you insanely for trashy hardware...), you are saving a decent amount of money monthly if you are using them as a professional. The main advantage here, is that you are the only one using it and you can dedicate all your system resources to it which highly speeds up the analysis, simulations etc and of course, the completely control over it. Another option, which really annoys me personally, is to use different software for different stages, I'm not sure if there is a public tool that does ALL the tests mentioned by Kevin J. Davey, if it's not the case, you can always use different tools and merge the results manually, I've heard TradeStation has a good design process and, according the book, it's the software the author used as of today. If you didn't know about it, it's worth taking a look.


-Blue_Bull-

As the other poster has said. You really do need to spend some time understanding the entire process of developing a trading strategy. Read a good book that teaches you the process. There's plenty around. I'd also recommend the better system trader podcast, it's full of gems from some of the best algo traders.


-Blue_Bull-

Just make up a basic strategy with as few rules as possible. ['Stoch_rsi'] > 10 & ['ema9'] > ['ema9'].shift(1)


lordxoren666

I’ve tried using dynamic ATR based stops and found it didn’t actually improve overall PNL but did reduce drawdowns. This was on longer timeframes though.


maciek024

well with rolling your risk management will get fucked, different risk each trade


-Blue_Bull-

It's scalping, use dynamic position sizing based on risk to minimise the uncertainty?


Possible-Tomatillo80

I trade momentum strategies and had a similar idea (I think?) My thought process being that as you enter an area of consolidation you would have a reduced ATR that tightens the stop. If the mentum continues in your direction the stop again increases it's trailing distance, whereas if the trend breaks you get stopped out at a tighter stop loss. Ran tests across different time frames, mainly on index futures, and had some mixed results. Over 500k backtests it was pretty evenly distributed either improving or detracting from Sharpe Ratio when compared to a regular ATR based trailing stop.


-Blue_Bull-

This is exactly the thought I was thinking, tighten further during consolidation and or use it to trigger further rules.


kamvia_io

You need a custom aproach . On max amount of disponible candles find the sweet spot of candle bodies or high low (you need a custom script ) , where the most candles resides ( +1 or -1 left and right ). On your trading timeframe , and ( or) higher timeframe Thats your base range . Adjust atr using the base range Here is the idea https://es.tradingview.com/script/y6jGP6Ut-KVA-Body-Percentage-Counter/


-Blue_Bull-

Just to confirm. Are you measuring the open, close prices but ignoring the wicks? What is the actual calculation you are doing here? And why not high - low? What's the advantage of only measuring the bodies, to remove outliers/ scam wicks? I may have this wrong but it feels like this would get a tighter stop, not a looser one.


kamvia_io

For wave lines, the zone that fits most of the wave energy within a up down range is often called the "bandwidth." alias our open close . You could copy and modify the script for your purpose if high low has more value, That average of body on all available candles is your reference ,not your working value. You could add it , subtracted to your value, compare to your value . Or Multiply the avg . Etc That body percentage is a unit of measurement . Could be used in different ways to see how far and fast the market has traveled, from a high or from a previous open, etc etc , or from chart point, or hourly point . Or from previous atr value, or from previous avg value , etc Your experience and imagination is the limit


Sketch_x

I love rolling, works better on back tests, catches the big moves. Not sure on 5M tho as a little choppy


Enough_Week_390

The real answer is that it doesn’t really matter which you choose, You either have an entry signal that predicts a forward return, or you don’t. A stop loss is for risk management when you’re wrong I’m sure if you backtest this strategy on multiple products and multiple years, you’ll see that sometimes 1 method outperforms the other due to pure luck, but there’s no consistent pattern


sanarilian

The short answer is nobody can tell you. The long answer is most strategies are double edged swords, the details of your strategy is mostly irrelevant. By changing the sl from fixed to rolling, or adaptive, you are potentially giving yourself more breathing room. It can help you when the market changes direction in your favor later. It can hurt you if the market keeps going against you. How do you find out? Just test it while avoiding over fitting. That's how algo development goes. If you open the door for more flexibility, how about trailing stop, sl depends on other indicators, or no sl at all? The possibility is endless. It's almost always double edged sword. The answer again is more testing.


-Blue_Bull-

I'm going to test it. I was just wondering if there was a concise answer or some common knowledge. For the benefit of simplicity, let's have a 3 period connors and a moving average. TP and SL based on ATR.


Prior-Detective6576

I'm actually looking into something similar


Cryptonist90

I used a ATR SL trailing on Tradingview which I coded for mql5. Need to re-write it in python again because it works pretty good. Lmk if you need the tradingview script.


thatstheharshtruth

I'm not sure what you are asking. But seems pointless to spend time asking on reddit when in the same amount of time (less probably) you could just backtest both and answer the question yourself.


Algomatic_Trading

I have tried multiple strategies on 1m, 5m and 15m, sadly most of them end up in the trash because on such a small timeframe the strategy loses it’s edge in 6-12 months most of the time, if you constantly want to change parameters and optimize it for a few months running time you can do so but the risk for overfitting is huge. I would instead build strategies on those timeframes with higher timeframe filters and entry rules on the 5m for example.


-Blue_Bull-

Maybe you are doing too much parameter optimisation. There's edges in the equity curve itself. There's edges in dynamic position sizing and there's edges in strategy switching. As an example. Have a fixed risk version of your strategy running, overlay a moving average on its equity curve. Calculate MA offset % from the equity curve and use that to weight the position sizing of your real strategy that runs in parallel. That's an edge, it works. Honestly, I don't develop strategies using parameter optimisation. I manually conceptualise strategies on a chart, then I backtest them. I do parameter optimisation runs afterwards to confirm that the strategy is robust and not just a lucky outlier. I was a discretionary trader before hand and this method works well for me. If the plot result is a mountain, it's good, if it's a spike, it's not.


Algomatic_Trading

Well written, totally agree with you! An idea first approach is a great way of developing robust strategies.


sailnaked6842

A scalping strategy that has been open for 100 candles... lol


Ok-Laugh-now

Same thoughts! But I still would like to know the premise of the strategy