Tag Archives: Candlesticks

Simplest 2 candlesticks demo with Python Matplotlib

Simplest 2 candlesticks demo with Python Matplotlib

This is from the book Python in Finance p107

Join my FREE newsletter to learn more about other simple charting in Python for automated trading

 Source code:

# -*- coding: utf-8 -*-
“””
Created on Tue Jan 26 19:28:55 2016

@author: quantlabsnet
“””
#Python in Finance p107

import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.finance as mpf

start = (2014, 5, 1)
end = (2014, 6, 30)
quotes = mpf.quotes_historical_yahoo_ohlc(‘YHOO’, start, end)
#quotes = mpf.quotes_historical_yahoo(‘^GDAXI’, start, end)
#quotes[:2]

quotes2 = mpf.quotes_historical_yahoo_ohlc(‘GM’, start, end)

fig, ax = plt.subplots(figsize=(8, 5))
fig.subplots_adjust(bottom=0.2)

print “Hello”
#use Line2d
#mpf.plot_day_summary_oclh(ax, quotes, ticksize=3, colorup=’k’, colordown=’r’)#
mpf.candlestick_ohlc(ax, quotes, width=0.6, colorup=’b’, colordown=’r’)
mpf.candlestick_ohlc(ax, quotes2, width=0.6, colorup=’g’, colordown=’k’)
#mpf.candlestick(ax, quotes, width=0.6, colorup=’b’, colordown=’r’)
plt.grid(True)
ax.xaxis_date()
# dates on the x-axis
ax.autoscale_view()

plt.setp(plt.gca().get_xticklabels(), rotation=30)
#raw_input(“Press Enter to continue…”)
print “bye”

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

could anyone tell, Is there any better charts than Candlesticks

Sorry, could anyone tell, Is there any better charts than Candlesticks
Personally, I really like candlesticks. As far as better goes, it’s pretty subjective. There is a “trending” variation on the typical candlestick chart. Basically it just switches up the colors in order to indicate trending alongside price movement.

range bars are catching up in popularity and help filter out some noise, it really comes down to personal choice, I would suggest you checkout the free NinjaTrader application and experiment with different bar types / time series.

Candlesticks are the best charts to analyse quickly the market.http://www.vestaforex.com/home.ws

I don’t think someone can say candlesticks are the best for everyone, it depends on what you’re looking for and how you’re looking at the data. If you’re setting up a program, then it won’t matter since you’re just pulling out data (ex. open/close etc..) if you’re using them to trade off the charts, the only downside is overlooking the highs/lows and only looking at the body, which can be a good or bad thing. I know most guys want to get rid of the noise, but there are many ways to accomplish that.

You have to try it and see if it fits your style, don’t try to just copy what someone else does, if you aren’t comfortable with it you won’t be successful over the long run

 

Three line break charts if you know how to use them and how they are constructed. So far few have been able to develop an automatic trading system with high returns using them because the range is hidden. That is few except me. I am happy to show that system live but, it is not for sale or lease just in house.

 

Candlesticks have always worked for me. OTOH, there are a number of my friends who really like the classic “pin-bar” charts because you can show more bars and look at a trend in detail over a longer time span.

 

Deming et al and contemporary thinkers like Don wheeler and Davis Balestracci say; process behavior charts. A line chart with control limits (mathematically derived limits and that makes sense) gives more insight on the process which yields the data. It’s quite frustrating that such a simple concept of process behavior is not been tried by many. Well if you want to know more about it- I would recommend “Understanding variation” a 45 page book by Donald J wheeler, which talks about analyzing home runs in baseball to manufacturing process.

 

Three line break chart

 

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!