Home > Technical Topics > Automated Trading > Developing IntraDay Strategies Using ATR for Risk

Developing IntraDay Strategies Using ATR for Risk

  1. Hello,

    I have been developing and backtesting/optimizing intraday trending (open bell to exit at close) strategies using static profit target and stop losses.

    Evaluating the performance back tested strategies, I notice not so good results using static profit target and stop losses. I think strategies have a challenging time determine 1 stop loss and 1 profit target for +1000 back tested trades. It doesn't seem idea. Therefore, I would like to experiment (or add to my exit methods) with dynamic or adaptive stop losses (even profit target) so the strategy can try and adapt with market changes. So I would like to use ATR (or average true range)

    Regarding IntraDay strategies (just your thoughts or opinions):

    1. How many previous days do you recommend using to measure ATR and calculate stop loss? I was thinking of using 1 day ATR to calculate. For example, if using 1 hr time frame, I would calculate daily ATR with just ATR(24) then multiply by a certain percentage (maybe 20%) to calculate stop loss amount for the day. I guess I could optimize ATR(X) to something favorable.

    2. What is your recommendation for setting profit target (or trailing stop) using a ATR methods? I was going to test 2 times whatever stop loss range to get favorable reward vs risk.

    Appreciate thoughts in advance or any other comments regarding dynamic stop loss.

    Thanks,
     
  2. You’re on the right track. Work hard at analyzing the different variables to:

    1. Find positive expectancy
    2. Find optimal risk/reward values
    3. Have a handle on drawdown

    Not much more to it. Easier said than done though.
     

  3. Absolutely. This is kind of canonical: you need to do this.



    Why?

    Granted, it may well be a big improvement on a constantly-fixed SL and TP, and it may lead (with enough testing) to significantly improved results, but it's surely very unlikely ever to be as good as using S/R-based SL's and TP's?



    However many produce the best results, overall, when you test a large selection of different ones.

    Sorry if it sounds unhelpful, but it's not something you can determine in abstract. What works well works well, and what works badly works badly.

    Auntie Xela has read your tea-leaves and sees copious backtesting and forward-testing in your future ... [​IMG]

    Whatever lookback period you use (and for that matter whatever multiples you use) there are always going to be some anomalies: the occasional major thrust-bar that makes a mess of an ATR reading; the occasional day with no range worth talking about for no discernible reason, etc. etc.



    A.B.T.

    ("Always be testing".)



    You're right to be thinking about this. :cool:

    For myself, I wouldn't start with assumptions. Why should a 1:2 R:R ratio happen to work out well? Your trading method might work out really well with a much bigger or much smaller R:R than that, but badly with that one. You just can't tell this without testing. You have to decide what to test, admittedly, but you start judging that through familiarity with the type of market, type of trading and type of volatility you're likely to encounter, and a whole selection of other stuff ... none of which you've said a word about. Making it hard to advise you. :confused:

    But my big question for you is "Why an ATR-multiple rather than perceived and/or anticipated and/or recent and/or multiple S/R lines/zones"? (You may have a perfectly good answer to this question, of course, in which case let's hear it ... but it is a significant question!). :)

    PS: One other observation which might help: the ATR-multiples to use for SL and TP are highly likely to be far more important than the ATR's lookback period is, in affecting overall, long-term outcomes.
     
  4. ATR and STD for me have been a proxy of volatility for intraday strategies.
     
  5. That`s nonsense.It`ll quickly curve fit your stops to the past optimum,so youll eventually catch the periods where youll be smoked.The history does not repeat itself.

    You`d need some gambling variables for your strategy to be viable.In contrast, you may wish to apply some ridiculously big stops.
     
  6. Thank you so much Xela for the good and thoughtful response. You gave me some ideas to think about.

    I will reply below.

    You asked why I would like to test using ATR as stop loss placement. I am not sure why use ATR, I read it in a book and online content. I am still learning ATR. I am glad you pointed out S/R-based SL and TP because I do have experienced trading S/R but only pivots. The strategies I was testing was intraday swing trending strategies. Attached is an example of what I can test even with an ema cross strategy and use the pivots for stop loss placement. Atleast then I know if i am stopped out, price is trending a different direction and the stop out is worth it.

    Thanks and no need for "sorry". You are correct, what ever the tested data shows, that what works. Makes great sense.

    lol, I agree with you on that. Lots of testing underway. I will back test ATR(X)*Y, with X representing look back period, and Y the multiple.

    Thanks for the question.

    My reason for ATR-multiple was because I read it in a book and online and I never thought of using ATR, this is my first time today studying ATR and its advantages. I was going to test with some strategies I wrote for intraday swing strategies.

    The S/R I am familiar with (and please recommend more) pivots points, O.H.L.C and the S/R I use to see (these can not be programmed from my knowledge) on the chart while discretionary trading.

    Are there more support and resistance I am missing?

    Thanks for your advice, especially regarding not looking for a certain R:R to better then another R:R.

    Thanks
     
  7. Thanks fordewind for your comment.

    Can you explain a bit more your comments "That`s nonsense. It`ll quickly curve fit your stops to the past optimum,so youll eventually catch the periods where youll be smoked."

    What is nonsense you are referring to?

    I always use Optimization for in-sample data testing to curve fit.

    What do you mean "You`d need some gambling variables for your strategy to be viable." What means gambling variables?
     
  8. Specifically what type of gambling variables? If we’re talking martingale, then he might as well hit the craps table.
     
  9. I wouldn’t be so sure of that, as I was once in that train of thought regarding visual chart based S/R points. I proved myself wrong, but unless he can do that, then I can see favoring chart based S/R over constant value points. A huge advantage of using ATR or STD as @Spectre2007 mentioned is the ability to definitively quantify and size the trades in a more proportionate manner, which also paves the way for proper systematic and auto trading.
     
  10. Nonsense to use ATR for risk measure.I know the automated guys who use ATR for signals on options, though.

    It mostly about the exucution frame in your strategy, i`m not going into specifics, though.It means, basically, to have a house advantage.For e.g., i tested a system where in the parameters, in the MM framework, the propfit was set to $1 dollar and the stop was set to $1000 dollars.The system showed the Sharpe over 40 and 60+ percents per annum.Dig deeper.
     
  11. Not martingale.Martingale is possible if there`s no spread and comissions.Some things were borrowed from Craps, though.

    Again,it requires lots of capital to play with automation.It`s not for the regular Joe.
     
  12. Thank you fordewind,

    I understand what you mean now.
     
  13. Welcome brother.If thats gonna help...
     

  14. I don't know ...

    The S/R I use myself is the simplest: swings high and low by prices.

    Obviously historical S/R doesn't always become future S/R, but it does often enough to be highly significant.

    I always envisage an increased probability of historical S/R becoming future S/R if it's (a) recent and/or (b) multiple.

    I always look at S/R levels as "very thick, approximate lines" or "zones" rather than ever expecting them to be absolutely accurate.

    In some markets, with a daily close (this doesn't apply so much to the futures I trade, where realistically the daily close is more or less that of an underlying rather than that of the futures themselves) I regard "the close" as a possible area of future S/R, too. For example, if trading the Dax index, I'd always know the previous day's "Frankfurt close" figure, in case it turns out to be relevant. Years ago, I used to trade the FTSE-100 and FTSE-250 indices, for a while, and was continually impressed by what a significant figure the "London close" often turned out to be. I haven't really seen this discussed in any books or forums or anywhere, but I do think there's something real behind it. That said, it may be less significant now than it was a decade ago. I don't know.

    My attitudes and beliefs about almost all trading matters are only evidence-based ones, so I have almost no respect at all for, or interest in, any other kind of "pivot points" at all (doubtless many people will disagree with me about that, of course: nothing new there [​IMG] ) and I've never seen anything other than anecdotal evidence for them, myself. But there you go: thousands of people trade according to phases of the moon, "Elliott waves", "Fibonacci numbers", astrology and probably homeopathy, too. [​IMG]
     
  15. Ah, the old grossly disproportionate, reverse risk/reward test. Good luck with that. If only life was that easy. :)
     
  16. There are several ATR/σ/_S/R_/stop-loss/profit-taker discussions in the past year.
    Most have a similar set of commenters to this thread, but with (perhaps) more detail.
    Worth looking up.

    To address your immediate questions:

    1) How many ATR periods?
    I use 6, but really, it depends on the underlying market; investigate and go with what best mirrors the actions of that market. (And check, check, and recheck, over time.)

    2) Where to put stops?
    Just inside the current ATR, whether above or below the market. I don't want max[reward] but rather maxE[reward] -- we have numbers; we have history; we have brains -- it pays (over time) to use 'em.
     
  17. @Xela
    "The S/R I use myself is the simplest: swings high and low by prices"

    Do you determine these levels yourself ie: you're looking at the chart and taking note of the high and low.
    Or do you use a program or service that provides such ?
    Thanks.
     

  18. Yes - just swings high and low by prices, including some from longer time-frame charts than the one I'm trading from (which I transfer over to the one I'm using, just as horizontal lines, albeit without ever expecting all of them to be completely relevant or accurate).



    Nooooooo, I may be a few lampuki short of a torta tal-ħut (as some people say), but even I can see for myself where support and resistance were ... [​IMG]
     
  19. LOL! What the heck is that??

    (You cracked a funny. Good going!)
    :)
     
  20. IOW... "measure with a micrometer, mark with a paint brush, cut with an axe?"
     
  21. Donchian Channels give you timeframe S/R levels. It’s much easier to see confluence of previous S/Rs. It’s one of my favorite indicators.

    In a upward trending market usually entries are placed at the lower Donchian with a stop loss as a fraction or multiple of ATR. ATR stops or profit targets were from a Turtle System I believe.
     
  22. Thank you Spectre2007,

    I never heard of Donchian Channels, I will study it this indicator for support and resistance. I will experiment with it.
     

  23. It's an indicator that's worth a look.

    In such threads, I'm always on the point of sounding pompous and pedantic by saying things like "Support and resistance are a function of price, not a function of indicators", but then I (sometimes) remember Donchian upper and lower lines, which do actually show S/R, in a sense, and I think better of it.

    The "channels" are just the area between the Donchian upper and lower lines.

    For myself, I was more interested in Donchian channel midlines, which were also independently invented in Japan as part of the Ichimoku indicator-set, and there they were given the names "Tenkan Sen" and "Kijun Sen" (they're exactly the same thing as Donchian midlines, although hardly anyone ever comments on it).
     
  24. A 24 hour ATR would be more or less useless. If anything, you should consider the ATR or whatever other measure during the exact time period you're interested in trading.
     
  25. Thank you Laissez Faire for response.

    What do you mean by "during the exact time period you're interested in trading" ?

    Thanks
     
  26. Hello all,

    Just an update.

    So I wanted to backtest an intraday-strategy I been working with using static stop loss versus using ATR(Period) times a Multiple as the stop loss. I wanted to see how the drawdown and average trade loss looks testing both.

    Optimization Period:
    2006-2011

    Instrument
    /ES

    TimeFrame
    30 min start trading at 8am to market close.

    Conclusion
    Optimizing an ATR times a Multiple reduces average loss per trade and overall drawdown versus using a static loss.

    Now I will work on making the profit target dynamic instead of using static profit target. Maybe a trailing stop or trailing ATR stop or maybe even resistance and support as other members have suggested.
     
  27. Forget the money.Look at this from logical point of view.
    You are in the business where score is kept by catching even small trends.How far will these trends move and how long is as important as putting stop loss.Whipsaws that will get you.What is out there that reduces whipsaw?Perhaps stop loss below certain number in given time period derived from measure volatility as this is a variable that changes as markets are dynamic.Only then you can build betting progression that will carry you to positive expectancy.
    Loss is a loss.This is why stops correctly placed are critical as whipsaw after whipsaw and another will happen and this will put your account in uncertain territory.

    Look at this from sequences standpoint,in those sequences stop loss needs to be kept below certain number to even have a chance to build betting progression that will show profit.
    Breakeven trades are also important,they lower drawdown and free money and less time spend in a trade which in turn reduces risk.Time stop trades that did not hit static stop loss are also interesting subject to explore.Tests prove that trailing stops are the worst and do not give positive expectancy,as a saying goes taking small profits is indeed way to the poorhouse

    I responded to your thread only because i seen ATR giving less positive results than static stops in your backtest

    BTW with slippage accounted for both systems would only make brokers money,not what you intended to do.

    The major problem is the more you learn the more difficult it becomes,unlike everything else you study to educate yourself.
     
  28. Interesting post ... Van der V has just made (at least) three very good points, here ...



    I agree. I'm slightly surprised not to see more discussion of this in the forum. It's always been true of my own trading, anyway. (My own "win-rate" figures are very misleading because of this: a significant proportion of my trades actually end up +1 or +2 ticks, which I think of as "breakeven", though strictly speaking of course it's a positive return.) But the point is well made.



    Again, I agree ... (I'd call it "number of bars stop" rather than "time stop", myself, just because I don't use timed charts, but the point's the same, really) - and I'm surprised not see more discussion of this here, also. These can work well.



    That's absolutely true of my own trading and testing, and true of others I've been shown as well. I think this is a hugely misunderstood subject, in trading.

    It's so easy to imagine that trailing stops "must be a good thing", but it's even easier - without detailed research and analysis - to lose track of how often trailing stops take you out of trades with small profits which could have been much bigger profits.

    They're also difficult, and counter-intuitive, to use.

    I'm convinced from my own experience and that of colleagues that many (probably "most") people using trailing stops and "believing in them" would actually be better off without them.
     
  29. IMV, "trailing stops" are neither inherently good nor bad... where they are placed is most important.

    There are several parameters one could use for them... like the lower Bollinger band, the lower Donchian channel, a moving average, others. One advantage is that a counter move is presumed and played to actually be a "counter", not a change in trend... up to the point the trailing stop is taken out. (Thus keeping the player in the trade and "riding out counters".) A second advantage... is that the user is actually using stop discipline. Exactly where to place stops is an art and somewhat arbitrary. Most important is that stop is used in some way to avoid turning a nice gain into a loser or worse yet... making a big mistake.

    FWIW... Personally, I don't use trailing stops in the traditional sense. My stops are always tighter.
     

  30. Yes, indeed ... I should have been clearer, distinguishing between "automated, tick/point/pip-count trailing stops" (generally unpleasant, inappropriate and bad, IMO) and others of the type you mention, which are more S/R based. I occasionally trail stops manually, myself, on the last third of my positions after closing two thirds, if it looks like running. Those are when Christmas comes early, kind of, but we've just had one, so my current expectations for those are nothing special. o_O



    Mine also: when I enter a trade, it's on the basis of the price moving in "my direction" pretty quickly; if it doesn't, I want to be taken out at low cost. (I can always re-enter later.)
     
  31. Ditto that!
     
  32. If you're trading the opening range, you need to consider the opening range only and not the range during other times of the day. As an example.

    I think you need more than simply an ATR of course, but it is of course an improvement beyond not using such measures in the first place. :)
     
  33. Hello Laissez Faire and thanks for response.

    Good comment and now I understand. Considering I only intraday trade from market open 8:00am to 3:15pm, this would make sense with to use ATR with small period to range of recent price action.
     
  34. I did some backtesting several months ago pitting an ATR-based stop and profit target vs a fixed money stop and profit target. I tested GC, CL, ES, LE and several others.

    My results showed that there wasn't much difference between them (the fixed money stop/target was actually slightly better).

    I threw out the spreadsheets so I don't have the data anymore to back that up, so believe it or not. The data I used was minute data from 2009 to 2015.
     
  35. Auto trading is gambling so the variables are just.
     
  36. Hello shatteredx

    Thank you for sharing your analysis.

    I am interested in how you designed an ATR profit target. Did you use something like 3xATR as your profit target or some other method? I would like to do an anlysis as well.

    Thanks
     
  37. Thank you Van_der_Voort_4. I appreciate your response.

    You wrote a good response that is simple to understand.

    I also programmed and back tested breakeven exit methods and, it does reduce drawdown. I can use this strategy to post results if you or anyone like to see.

    I also programmed and back tested trailing stop exit methods and, I can use this strategy to post results if you or anyone like to see. The static trailing stop was based on my own (pulled a number from the sky:)) risk vs reward and its not dynamic. I know better now. lol


    You are right about this part for sure. It is alot of learning but better to know, then not know.

    Thanks for your post.
     
  38. Yes that's pretty much what I did. I think used a 5 day ATR lookback and then optimized multiples from 0.01 to ??.00x using my in-sample data to see what a best case scenario for both profit targets would be (fixed money vs ATR multiple).

    I probably should've used a 30 or 60 day ATR but I don't think it would've changed much.

    This was part of a swing trading system (trades lasted 3 days on average) so I guess a day trading system like yours would be different.