Categories
Blog Kekstadt

Blog

IBM, the 100-year-old company, is wedging into a tight trade, but it looks like the Bulls are gearing to press a move higher. Just before year-end, the stock set a Three Inside Up Japanese candlestick pattern setting the stage for a rally.
Source code using TA-LIB and Python included.

TA-LIB Three Inside Up Buy Signal – $IBM

[av_heading tag=’h1′ padding=’10’ heading=’TA-LIB Three Inside Up Buy Signal on $IBM’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=”]
The 100-year-old company is wedging into a tight trade, but it looks like the Bulls are gearing to press a move higher.  Just before year-end, the stock set a Three Inside Up Japanese candlestick pattern setting the stage for a rally.  It is best to key off of the 154.40 price level for direction.  Trading above 154.40 keeps the Bulls heads up for a run at the 156.30 Resistance area.  Downward channeling Resistance comes into this spot, and the market may take a pause here.

Three Inside Up Technical Pattern shown on $IBM Jan 2, 2018
Three Inside Up Technical Pattern is shown on $IBM Jan 2, 2018

All trading above 156.30 locks in short-term Bullish momentum and should accelerate the new move higher.  159.02 is the longer term upside target as this stock rides the rally train.  Technicals and fundamentals are pointing towards positive movement.  IBM is entrenching itself in the blockchain business.  This puts IBM in a great position for 2018.  And if blockchain fails the company is exploding in cloud services and other hot tech sectors.
The flipside of the trade exists below the 154.40 pivot.  Expect a narrowing range here down to 152.49.  This zone will be choppy.  Do not get caught up here.  Only a Break under 152.49 confirms weakness, and the Bears desire to take IBM back down to 150.14.  This is it for a slide if the longer term trend is to remain positive.  Any move under 150.14 is a negative indication that this stock will remain on edge for a while.
IBM has been beaten down many times, but Big Old Blue still is a cornerstone of the tech sector.  2018 will be an interesting year for this stock with new tax rules and blockchain technology on the rise.  With this in mind, this stock will most likely be in a Buy Dips position for 2018.  This market may get beaten down, but it always seems to find a way to rebound.  Technicals should cause bumps in the road, but fundamentally it is hard to beat IBM.  As one of the largest landholders in the world, this company is asset rich beyond its high flying younger competitors.

Using TA-LIB to Detect Three Inside with Python With 1 Minute Bar Data

# make sure we have at least on valid bar by not checking until we are one minute into the trading day.
if service.system_time > md.market_open_time + service.time_interval(minutes=20, seconds=15):
    minute_bars = md.bar.minute(start=-20)
    # Get Open, High, Low, Clos (OHLC) data from the minute bars
    close = minute_bars.close
    high = minute_bars.high
    low = minute_bars.low
    open = minute_bars.open
    # Call the Candlestick 3 Inside function using TA-LIB
    # a negative number is a bearish(sell) signal and a positive is a bullish(buy) signal
    ThreeInside = talib.CDL3INSIDE(open, high, low, close)
    if ThreeInside[-1] != 0:
        print "{},Symbol={},Open={},High={},Low={},Close={},Signal={}".format(service.time_to_string(service.system_time), self.symbol, open[-1], high[-1], low[-1], close[-1], ThreeInside[-1])

Using TA-LIB to Detect Three Inside with Python With Daily Bar Data

 # symbol and timestamp
 print(self.symbol + ": " + service.time_to_string(service.system_time))
 # Get 100 Days (1 year) of Daily Bars from CloudQuant
 daily_bars = md.bar.daily(start=-100)
 # Get Open, High, Low, Clos (OHLC) data from the daily bars
 close = daily_bars.close
 high = daily_bars.high
 low = daily_bars.low
 open = daily_bars.open
 # Call the Candlestick 3 Inside function using TA-LIB
 # a negative number is a bearish(sell) signal and a positive is a bullish(buy) signal
 ThreeInside = talib.CDL3INSIDE(open, high, low, close)
 # get the date values so we can output the OHLC with the Candlstick Signal
 dates = service._context.market._storage.market_hours.keys()
 dateList = []
 for date in dates:
 dateList.append(str(date.strftime('%Y-%m-%d')))
 dates = sorted(dateList, reverse=True)[1:101]
 dates.sort()
 #Place the results OHLC & Signal results into python dictionaries for nice output in a table
 dict = OrderedDict()
 dict['date'] = dates
 dict['open'] = open
 dict['high'] = high
 dict['low'] = low
 dict['close'] = close
 dict['3Inside'] = ThreeInside
 # Create a user data file so we can reference the data later.
 # This file will show up in the user data tab.
 #
 # NOTE: You can open these files and select all, copy, then paste directly into
 # MS Excel! A great way to see your data and manipulate it.
 #
 self.filename = "Output_{}.html".format(self.symbol)
 #setup a title for the output table
 symbol = 'TA-LIB Signals: ' + self.symbol
 #print out an HTML table with the results
 print ktgfunc.talib_table(symbol, 1, dict)
 # write out the HTML document starting tags
 service.write_file(self.filename,"")
 service.write_file(self.filename,"")
 # write out the html table with the data in it
 service.write_file(self.filename, ktgfunc.talib_table(symbol, 1, dict))
 # write out the html closing tags.
 service.write_file(self.filename,"")

The full source code is available on CloudQuant

The preceding code snippets are contained in a full CloudQuant script that is available for anyone to copy and make their own. Use the following button to see the code.
Please note, you will need to be a registered user on our Application to see the full code.
[av_button label=’Full Source Code for TA-LIB Three Inside’ link=’manually,https://app.cloudquant.com/#/strategies?script=TALIB.Three_Inside’ link_target=” size=’small’ position=’center’ icon_select=’yes’ icon=’ue84b’ font=’entypo-fontello’ color=’theme-color’ custom_bg=’#444444′ custom_font=’#ffffff’ admin_preview_bg=”]
Theodore Kekstadt, President of Forex Trading Unlocked, Inc. Theodore Kekstadt is the Founder and President of Forex Trading Unlocked Inc., and a veteran trader of the Futures, Forex, and Equities markets.
Learn more about Mr. Kekstadt
Candlesticks for Traders High Probable Japanese Candlestick Patterns: For 21st Century Online Traders by Theodore Kekstadt
The thoughts and opinions in this blog are those of the author and do not represent an investment recommendation by CloudQuant or Kershner Trading Group. CloudQuant provides Mr. Kekstadt’s posts solely to demonstrate High Probable Japenese Candlestick Patterns that can be used by crowd researchers in their efforts to develop algorithmic trading strategies.