Table of Contents

Project: STOCK CHART CANDLES

A project for COURSENAME by YOUR NAME during the SEMESTER YEAR.

This project was begun on DATE and is anticipated to take TIME UNIT to complete. Project was completed on MONTH DAY, YEAR.

Objectives

State the purpose of this project. What is the point of this project? What do we hope to accomplish by undertaking it?

Prerequisites

In order to successfully accomplish/perform this project, the listed resources/experiences need to be consulted/achieved:

Background

State the idea or purpose of the project. What are you attempting to pursue?

You'll want to fill this section out with more detailed background information. DO NOT JUST PROVIDE A LINK.

Providing any links to original source material, such as from a project page, is a good idea.

You'll want to give a general overview of what is going to be accomplished (for example, if your project is about installing a web server, do a little write-up on web servers. What is it, why do we need one, how does it work, etc.)

Scope

Time to theme our exploration of programming in a different context- the financial market.

While you may not be familiar with the stock market and the “technicals” that are in the thoughts of traders, they are deeply rooted in algorithms, and need to be implemented into programs to aid traders in visualization, tracking, and predicting trends.

One such unit of measurement is the stock chart candle, which can be used on a number of time-specific stock charts (yearly, monthly, weekly, daily, hourly, minutely, etc.)

Regardless of the time period, the candle can be used to derive all sorts of information:

And many other more subtle points of analysis.

There are many great resources out on the internet covering the history and background of the candle, so please go and familiarize yourself with this before proceeding with actual program implementation. If you do not understand the why and how of a candle, you cannot successfully write a program to utilize them. You also are not eligible for receiving any help on program implementation for this project unless and until you can demonstrate familiarity with the concept of stock chart candles. Multiple violations of this will result in automatic deductions from your final project assessment; if you do not read this or do the necessary background research, it will not be spoon fed to you.

For this project, our task will be to implement a program the can read stock data from a text file, and textually render a single candle from that data.

I will be providing a few different data files, and your program must flexibly work with all of them (and any other file of similar format that may be introduced).

So, please implement a program that does the following:

I would also like each person to do their own post-visualization candle analysis. What type of candle is it?

Data file for use with the project can be found on Lab46 in: /var/public/cprog/data/spring2012/project4/

If you'd like an extra challenge, implement logic that “formats” the visualized candle to fit on a standard terminal display (assume 80×25).

Code

The C code:

/*
 * mycode.c - program that does blahblahblah
 *
 * Compile with: gcc -o myprogram mycode.c
 *
 *
 * Execute with: ./myprogram
 *
 */
 
#include <stdio.h>
 
int main()
{
    printf("Hello, World!\n");
 
    return(0);
}

Execution

An example run of your code (be sure to show off all operations):

lab46:~/src/cprog/project4$ ./candle 
ERROR! Must provide CSV file as argument!
lab46:~/src/cprog/project4$ ./candle stock1.csv 

STOCK SYMBOL: GLW
OPEN: 13	CLOSE: 22	HIGH: 23	LOW: 11

High ( 23.10):    *  
		  *  
		*****
		*   *
		*   *
		*   *
		*   *
		*   *
		*   *
		*   *
		*   *
		*****  
 Low ( 11.64):    *

lab46:~/src/cprog/project4$ 

Reflection

Comments/thoughts generated through performing the project, observations made, analysis rendered, conclusions wrought. What did you learn from doing this project?

References

In performing this project, the following resources were referenced:

Generally, state where you got informative and useful information to help you accomplish this project when you originally worked on it (from Google, other wiki documents on the Lab46 wiki, etc.)