Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
Like Tree5Likes

Candle patterns

This is a discussion on Candle patterns within the Trading tools forums, part of the Trading Forum category; I got an interesting idea that I haven't read about anywhere. Everyone knows that candlesticks are just a representation of ...

      
   
  1. #1
    Junior Member
    Join Date
    Jan 2014
    Posts
    19

    Candle patterns

    I got an interesting idea that I haven't read about anywhere. Everyone knows that candlesticks are just a representation of how the price have moved in a given time period. But normally the candle patterns are stuck on a fixed time start and end.
    It really shouldn't matter. I mean, a railroad track (marubozu) pattern could usually also be a gravestone or dragonfly doji if you shift the start and end time.

    So I modified an pattern recognition indicator to look for patterns over a X amount of candles.
    For example I can on a 1 minute chart every minute look if an engulfing pattern just was created when using the last 60 (for example) bars as a complete candle.

    I got to many hits. I tried different patterns and harami seems to be the most consistent over all timeframe and symbols. So I changed it a bit so only the first pattern in one direction shows until a pattern in the other direction shows up.

    This is two random timeframes on two random pairs. Looks interesting to me.

    Candle patterns-usdjpy-proh1.pngCandle patterns-eurusd-prom1.png

    This is just something I did this evening. I will trim the code and look it over some more but I really think something interesting can be found here. Maybe post here if anyone is interested?

    Just tell me if you want to see a specific symbol on a specific timeframe and on a specific date.
    Dr.Fox likes this.

  2. #2
    Administrator newdigital's Avatar
    Join Date
    Feb 2013
    Posts
    10,473
    Blog Entries
    2909
    Follow newdigital On Twitter Add newdigital on Facebook Add newdigital on Google+ Add newdigital on MySpace
    Add newdigital on Linkedin
    Thanks jay_eye,

    Yes, it should be nice to see this impriovement.
    Premium Trading Forum: subscription, public discussion and latest news
    Trading Forum wiki || MQL5 channel for the forum
    Trading blogs || My blog

  3. #3
    Junior Member
    Join Date
    Jan 2014
    Posts
    19
    Also this of course means that you can look for patterns on timeframes that usually arent available. 8 minutes. 6 hours. 144 minutes. Whatever youd like.
    Maybe the indicator would be good as a histogram where all patterns would show without cluttering the chart.

  4. #4
    Member
    Join Date
    Jul 2013
    Location
    witbank
    Posts
    60
    Interesting idea
    The histo sounds like a good idea - too much stuff around the candles is a distraction

  5. #5
    Junior Member
    Join Date
    Jan 2014
    Posts
    19
    I'm looking for a good indicator for pattern identification. I really don't like the one I am using right now. It seems the definitions is based on equities with gaps being a big part of it. Not something that is too common in a market that is open 24/5.

    Also the original code is kind of sloppy. I can fix it but would prefer to modify good code instead.

  6. #6
    Administrator newdigital's Avatar
    Join Date
    Feb 2013
    Posts
    10,473
    Blog Entries
    2909
    Follow newdigital On Twitter Add newdigital on Facebook Add newdigital on Google+ Add newdigital on MySpace
    Add newdigital on Linkedin
    Hi jay_eye,

    Which indicator needs to to be improved?
    What to improve?

    May be - I did not understand it correctly - so sorry ...
    Premium Trading Forum: subscription, public discussion and latest news
    Trading Forum wiki || MQL5 channel for the forum
    Trading blogs || My blog

  7. #7
    Junior Member
    Join Date
    Jan 2014
    Posts
    19
    Quote Originally Posted by newdigital View Post
    Hi jay_eye,

    Which indicator needs to to be improved?
    What to improve?

    May be - I did not understand it correctly - so sorry ...
    Sorry. The code for identifying candle patterns. I am using one called "Pattern Recognition.mq4" that I have modified so I didn't have to rewrite the definitions of the patterns. I am just changing what the code interprets as the last three bars OHLC.

    I realised I created a major bug that changes the indicator a LOT. The logic in the code was backwards. It started from last bar and went backwards in time. I need to do the opposite... since that is they way time works. I fixed that and it actually now looks even more interesting imo.

    I havent fixed the histogram yet but the first pattern in one direction is an arrow. The following is just a dot.

    To compare i took the EURUSD 5 min chart with the standard pattern recognition for engulfing bars. Compare that to my version on the 1 minute bars but with 5 bars lookback.
    Candle patterns-eurusd-prom5.pngCandle patterns-eurusd-prom1_5.png

    Also 1h standard recognition with 1min bars with 60 bars lookback.

    Candle patterns-eurusd-prom1_60.pngCandle patterns-eurusd-proh1.png

    I still think this looks really interesting. Maybe for a scalping system.
    Will keep working on this.

    I might just add patterns that is interesting by hand so I can keep total control of the code.
    Dr.Fox likes this.

  8. #8
    Junior Member
    Join Date
    Jan 2014
    Posts
    19

    Some code to share

    Played around with this some more. Rewrote the code to be more logical (to me). Also created a histo version.
    This is how it could look with a 1M chart. Arrows on the chart on first engulfing when 20 bars create a new bar.
    Under this five histos of 5, 15, 30, 60 and 240 min lookback. Basically to simulate the standard timeframes.
    I coloured the histos so a blue all the way to 2 means a pattern was found. Blue to 1 means that the last pattern was bullish. Red for bearish.
    Candle patterns-eurusd-m1-mtf-candle-patterns.png

    I will continue to work on this. But I am working full time and have small children so don't expect fast progress. Would be nice to hear if this is something you would like me to keep posting about.
    Attached Files Attached Files
    Dr.Fox likes this.

  9. #9
    Junior Member
    Join Date
    Jan 2014
    Posts
    19
    Couldn't help but notice that this looks a bit like swamicharts when I add a lot of histos of increasing/decreasing bar lookback.. A swamichart of a candlepattern (engulfing) in this case. More obvious when looking at a chart you can scroll how the trends start in a low tf and spread to the higher.

  10. #10
    Junior Member
    Join Date
    Jan 2014
    Posts
    19
    Quote Originally Posted by jay_eye View Post
    Couldn't help but notice that this looks a bit like swamicharts when I add a lot of histos of increasing/decreasing bar lookback.. A swamichart of a candlepattern (engulfing) in this case. More obvious when looking at a chart you can scroll how the trends start in a low tf and spread to the higher.
    This is what I am talking about. I pulled up 9 histos. Lookback fibonumbers (well, why not?). It really looks like a swami where you can see how engulfing patterns start on lower timeframes and spreads to higher if an upward trend is started.
    Candle patterns-eurusd-swami.png

    Changed the visual part of the histo. Like this a bit more and looks less cluttered when many histos are open.

    Multibar Candle Histo.mq4
    Dr.Fox likes this.

Page 1 of 2 1 2 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •