Sharing automated strategy tips
Forums › ProRealTime English forum › General trading discussions › Sharing automated strategy tips
- This topic has 13 replies, 8 voices, and was last updated 1 month ago by justisan.
-
-
07/06/2024 at 12:39 PM #234837
Making this post to share tips for creating automated trading strategies and my thoughts. My approach to automated trading is it shouldnt be trying to copy a human traded strategy. Translating human trading to automated systems is challenging due to factors like intuition that can’t be easily coded. I think automated trading requires a completely different mindset. It should maximize its strengths, particularly in short timeframe trading. I prefer not to code swing trading strategies over multiple days because I can do that better manually. Instead, automated trading should find trades that we might miss due to mental exhaustion or the inability to process multiple pieces of information simultaneously.
What I and probably most people currently lack are creative ideas. Rather than sharing complete strategies, which people wont do, esp with the marketplace (I wouldnt either if i had a winner). I think we should share concepts and experiences. Let’s discuss what you think works and what doesn’t, and see if we can collaborate. Heres some of my inital thoughts and tips-
Entries
Most indicators I’ve found are useless. If an indicator works on one market but not another, it will eventually fail. I’ve stopped using traditional indicators for entry signals since they’ve been tried in all combinations. It may work it may not, it may work for a week or a year and fail utterly. I now code entries based on price actions, such as simple high/low or fractals. Price action entries work across most stocks and are fundamental to trading and have been consistent since the beginning of markets.
Noise
A major issue we face is market noise. How do we code what humans can easily see? We can visually distinguish trending from ranging markets dynamically, but coding this is difficult because it’s always fixed. I started experimenting with entries on very close timeframes, like 1 minute and 55 seconds, to confirm signals. If it works on 1 minute, it should work on 55 seconds. I find it helps to filter out some bad or sporadic signals.
Exit
I find exit strategies to be as important, if not more important, than entries. Fixed exits, like 20 points in a dynamic market, are not sustainable long-term. I’ve been using 2 Supertrend with different values to combat noise as my standard exit strategy. I think most effort goes into creating a exit strategie/money management.
Backtesting
Optimising values always leads to failure (in my experience). Even walkforward, monte carlo (different software) etc. Optimising values of an indicator (back to my first point) and deploying the strategy just fails. I have just been using the optimisastion system to find strategies on different markets. Eg if option1=0, if option2=1 to test different indicators or snippets of code. Mainly to quickly filter out code that dosent work. To compare different snippets eg direrent exit strategies etc.
These are just a few thoughts from my personal experience. What is your experience from automated trading?
2 users thanked author for this post.
07/06/2024 at 3:28 PM #234846To add a few humble thoughts… I used to experiment a lot with all kinds of indicators. Often with SMAs… often in time units such as 1 minute… I often tried to incorporate my preferences, such as exiting the trade daily, or something similar into my systems. Yes… it works for a while, until the market structure changes a bit… then you notice how over-optimized these systems were. Today I mainly only use range breakout systems… often without any indicators at all. I either orient myself on daily marks such as Dhigh/dlow or highest[x](high). I also no longer set take profits, but rather work with trailing and/or time exits within a day. This way a good trade runs as far as possible and is not cut off by a take profit. As a second category of systems, I use mean reverses of all kinds in high time units such as H4. In my opinion, the most important thing is the choice of market. For me personally, DAX, for example, is quite difficult to trade. I only use SP500 and NASDAQ.
2 users thanked author for this post.
07/06/2024 at 4:33 PM #234849What always amazes me is that no one examines the data…
What are the characteristics of the index/stock data you use and do these characteristics change when I use a different time frame, for example…
The data is the basis and before you start with indicators and patterns, you will first need to know what kind of data you are dealing with…(trending, ranging, random, mixed…)
07/06/2024 at 4:42 PM #234851Go with the big money… ideally SP500 only long. That way you’re on the safe side. No matter whether scalp, swing or mean reverse.
1 user thanked author for this post.
07/08/2024 at 2:35 PM #234952Im starting to look more into a semiautomatic/manual way off using algos coz off the fact that no market stays the same forever.
So using screeners to look for stocks and then have long only or short only algos that will run untill conditions shange or dont work out as expected.
I also feel that exits are way more important then entrys.
1 user thanked author for this post.
07/10/2024 at 11:07 AM #235006Go with the big money… ideally SP500 only long. That way you’re on the safe side. No matter whether scalp, swing or mean reverse.
I like your tips Phoentzs. Will have a look into it. But before that. Do you have a favorite trailingstopploss-code?
08/05/2024 at 12:57 PM #236135I am not Phoentzs but one of my favourites trailing stop loss code is from you SnorreDK, from this thread: https://www.prorealcode.com/topic/nas-3m-rsih-dmh-v0-1-john-ehlers/
Do you have another favourite?
I have noticed the same thing about indicators. I havent found a robust strategy based on indicators. Usually my strategies are built with a price action as base (candle stick pattern/high-lows etc) and then with some extra filters, like trend filters (SMA,LinearRegression), volatilityfilters, trendstrength or volume. Add that with a nice trailing stop and it seems to usually work nice and robust for me.
One thing that really helped me was that when I first was developing strategies, was that I only had access to 200k units. When I later got access to 1M bars, I could try all of my 30-40 developed strategies with 2-8 years OOS. Most of my strategies was curvefitted. A few of them showed the same nice equity curve, as in 200k units. Those I trade today! A nice eye opener how valuable OOS data really is, in order to avoid curve fitting.
1 user thanked author for this post.
08/07/2024 at 12:59 PM #236219SweTrade, no Cred to me for that trailing stoploss.
Got it here: https://www.prorealcode.com/prorealtime-trading-strategies/vectorial-dax-m5/
Intressting Ideas. Do u use MTF?
Do u use 1 priceaction and then filters on higher timeframes or what have u found that works best? Any favorite timeframe and indice?
08/09/2024 at 9:22 AM #236287Noise
I started experimenting with entries on very close timeframes, like 1 minute and 55 seconds, to confirm signals. If it works on 1 minute, it should work on 55 seconds. I find it helps to filter out some bad or sporadic signals.
Exit
I’ve been using 2 Supertrend with different values to combat noise as my standard exit strategy.
I found this subject very intressting.
Would you like to expain the qouted text more?
08/11/2024 at 10:05 AM #236317Noise A major issue we face is market noise. How do we code what humans can easily see? We can visually distinguish trending from ranging markets dynamically, but coding this is difficult because it’s always fixed. I started experimenting with entries on very close timeframes, like 1 minute and 55 seconds, to confirm signals. If it works on 1 minute, it should work on 55 seconds. I find it helps to filter out some bad or sporadic signals.
How do you combine 1 minute and 55sec in same strategy? Its not multiples of eachother and doesnt work as MTF
08/11/2024 at 11:02 PM #236321Do u use MTF? Do u use 1 priceaction and then filters on higher timeframes or what have u found that works best? Any favorite timeframe and indice?
Sometimes I use MTF, but mainly for a simple longtrend, like above daily SMA200. I havent had much success with implementing a strategy workflow with MTF in it unfortunlately. Do you have any tips on how to use MTF in your favor?
Nasdaq seem to be the easiest to create strategies for me. Simple long trend-following. Also I have some for DAX and SP500. 1-5 minute timeframe. What are you trading mainly and what are your best strategy tips?
08/28/2024 at 7:55 AM #236773Do u use MTF? Do u use 1 priceaction and then filters on higher timeframes or what have u found that works best? Any favorite timeframe and indice?
Sometimes I use MTF, but mainly for a simple longtrend, like above daily SMA200. I havent had much success with implementing a strategy workflow with MTF in it unfortunlately. Do you have any tips on how to use MTF in your favor?
Nasdaq seem to be the easiest to create strategies for me. Simple long trend-following. Also I have some for DAX and SP500. 1-5 minute timeframe. What are you trading mainly and what are your best strategy tips?
When I create an algorithm, I always start with
CumulateOrders = False
to prevent the accumulation of multiple orders. To ensure the algorithm’s robustness, I also test it withCumulateOrders = True
. If the algorithm still produces a smooth equity curve and avoids significant losses during backtesting, I know I’m on the right track with a sustainable strategy.10/06/2024 at 2:15 PM #238537You deploy the strategy in the 5 second timeframe
10/15/2024 at 10:23 AM #238999ahoj!
difficult topic… while everybody starting with trading wants them, to give “tips” assumes that one who is giving them is doing something/everything “right”. but it’s kind of trap, even those who might be earning money trading/doing things right, might be never, and I mean really never, sure that it will continue. so it can be considered kind of pure arrogance giving away “tips” to others about how to arrange automatic trading, or trading in general. Still I decided to write something about it, hopefully in a bit un-conventional way, with possibly un-usual content, still refererring to Monochrome’s headlines “entries/noise/exits/backtesting”.
Entries
when you design a setup, and here in particular the entry price point, think about “why the HELL market (which are thousands of market participants with huge money in the pockets in sum) should PAY ME for taking this particular risk/trade at THIS pricepoint??!!”. while trading, we are taking (huge!) risks, and we are expecting market to pay us for our effort. is market rawarding risk-taking? yes. is market rewarding taking EVERY risk? absolutely no. endless losing accounts are witnesses. there is nobody, really nobody in the market who is SO KIND just waiting for the opportunity to give me his/her money. exactly opposite is the case – everybody is just eager to take my money, every day, every second. so if I am as trader expecting a reward, I have to take risks for which others will be willing to pay and possibly will be willing to pay a lot. do I expect that “market” (again – market are thousands of participants with millions and billions in the pockets in sum…) to PAY ME because I am taking a position at a pricepoint where moving avarage with period x crosses a moving avarage with period y? or because that particular pricepoint represents some fibonacci-level? or because some “oscilator” ticks up at exactly that moment? does the market really pay me/ANYBODY for that? so what kind of entries do I need to take in order to get payed for the enormous riks I am taking? this have be pricepoints where OTHERS are kind of forced to get out, because they are LOSING and possibly losing a lot, losing so much that they cannot afford to lose even more.
Exits
what’s valid for entries, as indicated above, is valid for exits more or less. at least for profit taking. one needs to take profits at the moments when “everybody else” is kind of forced to take the opposite position. not when moving avarage with period x crosses moving avarage with period y or when parabolic sar or other magic profit “trailing” system tells to do so. market does not “know” about it and does not pay that much for such absurd concepts.
Noise
@Monochrome you are pointing it out as major issue, and by that you mean diffiuculty of distinguishing if market is in some trending / not-trending conditions. you tell humans can see/distinguish trends easily while coding of all that is kind difficult. my “tip” is – to completely ignore trending conditions. humans just believe that they can see them. yep, they kind of can “see” them when it’s too late for any action – they see them with the hindsight only, and even what they see is question of power of their own imagination/interpretation.MoneyManagement (MM)
Monochrome kind of includes it in the “Exit” topic. I separate it. by MM I mean basically position sizing. one has to avoid over-trading / too much risk-taking even if one’s basic strategy has positive expectancy. one has to be able psychologically and financially to affort certain level of risk taking/losses, and first of all, one has to make kind of sure that non of risk taking/losses leads one to bancruptcy.
Etries&Exits&MM
Non of them is more important than the others. One has to see / approach them simultaniously. Does not matter how perfect is one or two of them, if you mess up the third one, you are screwed.
Backtesting / Optimization
Be afraid of it, be very afraid. I mean the “optimization”. my “tip” here is not to use optimization tools for maximizing/minimizing some performance parameters of system, but mostly for testing out robustness of system, its sensitivity for changes of parameters/variables. this kind of testing out should tell one first of all IF a parameter is worth to be used at all or is it crap and has to be rather skipped. a variable is quite sure crap, if relative small changes of it’s value affect system performance big way. All what’s done “correct” with Entries&Exits&MM can be easily destroyed by “optimization” of some crazy parameters which should be not part of system at all.
have fun trading!
justisan
2 users thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on