how hard is it to backtest and code candle chart info

Discussion in 'App Development' started by FreeMktFisherMN, Feb 15, 2014.

  1. any recommendations on other trading forums more specific to programming and OHLC? Maybe posting this same topic there would yield some more actionable advice.

    I am willing to take the time to learn some programming basics. But actually if I can import the OHLC on 15 min. candles over several years into Excel, it pretty much would come down to sorting out data and running tests, but that is the part I wouldn't know at this point.

    e.g., how to add constraints as I prob. would want to refine the basic strategy if say something comes up when presumably a position would be open that would make me want to close it and save more downside, versus the vanilla 'stay in it until it hits SL or profit tgt'.

    When it's in Excel all the OHLC data I'm sure there are not too complex ways to first identify the implicit long wicks I'm looking for from the magnitude between the body high/lo of the candle, to the high side (wick is either the low to the lowest part of body, or high to highest part of body). But how to go from there where I have sorted out the setups to running the test and having it close out if ... and ... and then reopen a position the next time such a wick was printed, not sure there.
     
    #11     Feb 17, 2014
  2. 2rosy

    2rosy

    http://stackoverflow.com/

    In order to research you have to know how to program somewhat. What you're asking to do isnt that difficult.
     
    #12     Feb 17, 2014
  3. Yeah I can see that, and I am someone who teaches myself better than I learn from others , but not sure where to start here, I guess. I don't know if I really need/should bother learning all kinds of programming, because what I like about this 'edge' on this strategy is it is relatively simple, and I think it gets overlooked that the market can only go up or down. Sure it does so in 'vectors' of momentum and short squeezes and other game theory kind of concepts, but I think it gets underweighted how a position can be ITM pretty decently if one has chosen well, and from there it is about optimizing if possible.

    Thus I'm really just focused on this baseline strategy and not interested in all the other TA tools, although certainly I'm aware of MA and fib and TL etc.

    This copper strategy on 15 min I will keep checking how it would work as more trading days come in. The initial test was about 20 setups came in 2 weeks' time and 12 for sure were winners, 7 I'd say losers, one ambiguous as as soon as the one signal came it was reversed by another. So with an 18 tick win tgt and 12 tick SL, that would be, with 12.5 tick value, $1650 over two weeks, only one lot, and max downside per trade $150.

    Obviously 12:7 is a good ratio given already the winners will be more than losers, but not enough data. I've noticed this translates to other timeframes, too, but not conducive to futures trading if one doesn't have big account size. For instance, even on weekly I saw such a bullish candle with the long tail wick on silver, and eventually thought it would be followed up by a nice move up, and just now silver is doing that. These hammer and hammer-like candles are good indicators, IMO.
     
    #13     Feb 17, 2014
  4. wrbtrader

    wrbtrader

    I don't think you're really interested in programming because as I and others have stated in this thread and your other thread...that's easy to learn and many free resources out there for such.

    Further, every time you respond to someones answer about how to get the programming skills...you seem to mainly talk about the results of some strategy you're designing or the data you need to complete your testing.

    1) You can learn the programming for free...lots of resources out there for such.

    2) Historical data will cost you.

    3) Some charting software allows you to edit (change) their default candlestick patterns recognition (e.g. Tradestation) so that you can customize it for your own candlestick patterns.

    4) You will notice "few" or "none" are interested in your strategy manual backtesting results. It's just the nature of trading forums. Simply, no matter what forum you do (say) such at...similar lack of interest and I think its because so many have been there/done that as you're currently doing. Yet, you may catch some discussion interest via posting broker platform simulation results or real-money results if discussions about your backtesting results is what you're really seeking.
     
    #14     Feb 17, 2014
  5. Understand. I'm not a market vet at all, having only really traded in my Scottrade account leveraged ETFs. I realized the importance of having an edge, and IMO having an edge that is more mechanical and less prone to drama and swings is good, which is the advantage of algos or at least an algo-like approach.

    As I said I teach myself most things better than I do watching over someone's shoulder, but in this case I really don't know where to start as I don't have any programming, coding, or even much Excel experience (I do know what Excel can do, like Solver optimization, etc. but not a pro/very comfortable with it at this point).

    I sent an email to TradeStation on their contact form about this and might speak to someone there live.

    In describing the actual strategy I was focusing more on how it is not that complicated, as I'm sure some other strategies can be. It doesn't seem likely that I'm going to become a quant and financial engineer; just a discretionary trader who thinks he's found a discernible edge and wants to test it out over more data and also see if it can be refined to be optimized as far as risk/reward.
     
    #15     Feb 17, 2014
  6. This hammer strategy with the idiosyncrasy I look for has me looking for 108 on WTI crude within a couple weeks or sooner.
     
    #16     Feb 17, 2014
  7. dom993

    dom993

    There are only 2 ways:

    - You try to do it all by yourself (that will take you a lot of time)
    - You pay someone to help you get where you want (that will take you some money)

    Quality historical data is never free, but if you work with someone who already has that data, you might not need to pay for it (as long as you don't want that data handed to you).

    To be honest, most "strategies" based on visual backtesting fail when systematically backtested. Many reasons for that, but the bottom-line is, do not have too high expectations regardless of which way you choose.
     
    #17     Feb 17, 2014
  8. Yeah I realize it's not likely this holds water. But over 2 weeks I got 18 setups where I would enter (bear/bull) and 11 would have gotten me 18 ticks (copper) and 7 would have had me stopped out, 12 ticks apiece, so 11:7 is a good ratio, especially when the winners are 50% more ticks than the losers.

    15 min chart over two weeks has quite a few candles. It's all about these wicks and some observations I made and spent a good deal of time looking through.

    I hear you on the backtesting. I am going to call some people who I know and also IB or Tradestation and see what they say, and what their other clients do. I don't think I am ever going to be a major algo person as I think I am more discretionary/positional, maybe more suited for a hedge fund than with underlying thesis on commodities or whatever, instead of quick in and out, but who knows? So far I like this strategy. And of the 7 losers, 4 of them were in a row, which is not good as far as that's 48 ticks, but also maybe that is a rare occurrence and not representative. Every day that passes I'll look at the same chart and be able to add new data anyways. Not as good as going back years, but we'll see.

    OHLC data on 15 min candles imported into excel, highlight the implicit long wicks I'm looking for, somehow get it to presume entry (binary buy/sell) and also see what happens next, SL or profit tgt hit, then wait for next entry. Not overly complex, although the wick thing is for sure unconventional, but that also might be in my favor, too, as opposed to pure hammer plays.
     
    #18     Feb 17, 2014
  9. Would you happen to know firms who do this kind of backtesting from people wherein one only gives verbal advice pretty much, and nothing in code speak? In my case I think it'd be pretty doable to translate as it is just magnitudes of the wicks followed by a buy or sell, and what happens next with the position closed either by SL or profit tgt.

    If I were to go about learning all this by myself, not sure where I'd start, as I really only want to know things pertinent to trading, not computer science and all sorts of coding in general. It'd be great if someone has advice on that if I were to do that, and how long it would take, which people to learn from or online lessons. For now I'll keep seeing what happens in copper on the 15 min with a new day of data every day at least. I think this pattern I've discerned is really about just the retracement nature of markets, within relatively narrow range, and copper is obviously much more tame than crude it seems. Crude would have to have way bigger SLs it looked like to me, or much bigger size winners, but I'd rather obviously have 60% winning rate or more AND win size>loss size, even if not by so much, and so far this other one has gotten me that (and for all I know 18:12 ratio maybe should be 20 to 10; my guess is any edge wouldn't get much better than what I have, though, particularly for something so unsophisticated.
     
    #19     Feb 17, 2014
  10. dom993

    dom993

    This is something I can do for you. I did PM you my contact info the other day, which is all I can do given that I am not an ET Sponsor (or you can google dom993trading)
     
    #20     Feb 18, 2014