Skip to content

Commit c2cb04f

Browse files
authored
update to 0.9.1 (#115)
1 parent 0bc8dfc commit c2cb04f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+13879
-1971
lines changed

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
*.o
2+
*.a
3+
*.ca
4+
5+
cli
6+
cli.exe
7+
smoke
8+
smoke.exe
9+
smoke_amal
10+
smoke_amal.exe
11+
fuzzer
12+
fuzzer.exe
13+
example1
14+
example1.exe
15+
example2
16+
example2.exe
17+
sample
18+
sample.exe
19+
benchmark
20+
benchmark.exe

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
language: c
22

3+
before_install:
4+
- sudo apt-get install -y tcl
5+
36
os:
47
- linux
5-
- osx
8+
#- osx TODO figure out how to get tcl on osx
69

710
compiler:
811
- clang

AUTHORS

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
Tulip Indicators was made by:
22

33
Lewis Van Winkle, LV@tulipcharts.org
4+
Yannick Heinrich, yannick.heinrich@gmail.com
5+
Johan Henriksson, johan@stackpoint.se
6+
Ilya Pikulin, ilya.pikulin@gmail.com
47

58

6-
7-
Special Thanks:
8-
9-
The stochrsi indicator was sponsored by: Gunthy (https://gunthy.org)
10-
11-
12-
13-
Want your name here? Please consider contributing. We'll always welcome help.
14-
See CONTRIBUTING for more info.
9+
Want your name here? Please consider contributing. We'll always welcome
10+
high-quality help. See CONTRIBUTING for more info.

Makefile

Lines changed: 62 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
CC ?= gcc
1+
CC = gcc
22
AR ?= ar
33
RANLIB ?= ranlib
44

5-
#CCFLAGS ?= -Wall -Wextra -Werror -Wshadow -Wconversion -O2 -g -pg -fprofile-arcs -ftest-coverage
6-
#CCFLAGS ?= -Wall -Wextra -Werror -Wshadow -Wconversion -O2 -g -pedantic -std=c99
7-
CCFLAGS ?= -Wall -Wextra -Wshadow -Wconversion -O2 -g
5+
CCFLAGS ?= -Wall -Wextra -Wshadow -Wconversion -std=c99 -pedantic -O2 -g
86

97
SRCS=$(wildcard indicators/*.c)
108
SRCS+=$(wildcard utils/*.c)
@@ -13,20 +11,25 @@ AMAL=$(SRCS:%.c=%.ca)
1311

1412
.SUFFIXES: .c .o .h .ca
1513

16-
all: libindicators.a sample example1 example2 fuzzer smoke
14+
all: libindicators.a sample example1 example2 fuzzer smoke smoke_amal benchmark cli
1715

18-
libindicators.a: indicators_index.o $(OBJS)
19-
$(AR) rcu $@ $^
20-
$(RANLIB) $@
21-
22-
23-
indicators_index.o: indicators.h
16+
indicators.h: build.tcl templates/indicators.h templates/indicators.c templates/candles.h templates/candles.c
17+
tclsh build.tcl
2418

19+
libindicators.a: indicators.h candles.h indicators.c candles.c $(OBJS)
20+
$(CC) -c $(CCFLAGS) indicators.c -o indicators.o
21+
$(CC) -c $(CCFLAGS) candles.c -o candles.o
22+
$(AR) rcu $@ $^ indicators.o candles.o
23+
$(RANLIB) $@
2524

2625
smoke: smoke.o libindicators.a
2726
$(CC) $(CCFLAGS) -o $@ $^ -lm
2827
./$@
2928

29+
smoke_amal: smoke.o tiamalgamation.o
30+
$(CC) $(CCFLAGS) -o $@ $^ -lm
31+
./$@
32+
3033
example1: example1.o libindicators.a
3134
$(CC) $(CCFLAGS) -o $@ $^ -lm
3235

@@ -39,20 +42,47 @@ fuzzer: fuzzer.o libindicators.a
3942
sample: sample.o libindicators.a
4043
$(CC) $(CCFLAGS) -o $@ $^ -lm
4144

42-
#Optional benchmark program. Requires TA-Lib.
45+
cli: cli.o libindicators.a
46+
$(CC) $(CCFLAGS) -o $@ $^ -lm
47+
48+
#Benchmark and further testing.
4349
benchmark: benchmark.o libindicators.a
44-
$(CC) $(CCFLAGS) -o $@ $^ -lta_lib -lm
50+
$(CC) $(CCFLAGS) -o $@ $^ -lm
51+
52+
#Optional benchmark program. Requires TA-Lib.
53+
benchmark_talib: benchmark.c libindicators.a
54+
$(CC) $(CCFLAGS) -o $@ $^ -DTA_LIB -lta_lib -lm
4555

4656
#This will build all of Tulip Indicators into one .c file.
47-
tiamalgamation.c: $(AMAL) indicators_index.ca indicators.h
57+
#This is recommended to be used with other bindings for ease of build.
58+
tiamalgamation.c: $(AMAL) indicators.ca indicators.h candles.ca candles.h
4859
echo -e "/*\n * TULIP INDICATORS AMALGAMATION\n * This is all of Tulip Indicators in one file.\n * To get the original sources, go to https://tulipindicators.org\n */\n\n" \
49-
| cat - indicators.h utils/buffer.h utils/minmax.h $(AMAL) indicators_index.ca > $@
60+
| cat - indicators.h candles.h utils/buffer.h utils/localbuffer.h utils/minmax.h $(AMAL) indicators.ca candles.ca > $@
61+
62+
63+
$(OBJS): indicators.h candles.h
64+
65+
smoke.o: indicators.h candles.h
66+
67+
example1.o: indicators.h
68+
69+
example2.o: indicators.h
70+
71+
fuzzer.o: indicators.h candles.h
72+
73+
sample.o: indicators.h candles.h
74+
75+
cli.o: indicators.h candles.h
76+
77+
benchmark.o: indicators.h candles.h
78+
79+
$(AMAL): indicators.h candles.h
5080

5181
.c.o:
5282
$(CC) -c $(CCFLAGS) $< -o $@
5383

5484
.c.ca:
55-
$(CC) -E -P $(CCFLAGS) $< -o $@ -D TI_SKIP_SYSTEM_HEADERS -D __TI_INDICATORS_H__ -D __BUFFER_H__ -D __MINMAX_H__
85+
$(CC) -E -P $(CCFLAGS) $< -o $@ -D TI_SKIP_SYSTEM_HEADERS -D __TI_INDICATORS_H__ -D __TC_CANDLES_H__ -D __BUFFER_H__ -D __LOCALBUFFER_H__ -D __MINMAX_H__
5686

5787

5888
clean:
@@ -64,5 +94,20 @@ clean:
6494
rm -f *.ca
6595
rm -f indicators/*.ca
6696
rm -f utils/*.ca
97+
98+
veryclean:
99+
rm -f *.a
100+
rm -f *.exe
101+
rm -f *.o
102+
rm -f indicators/*.o
103+
rm -f utils/*.o
104+
rm -f *.ca
105+
rm -f indicators/*.ca
106+
rm -f utils/*.ca
107+
rm -f indicators.h
108+
rm -f indicators.c
109+
rm -f candles.h
110+
rm -f candles.c
67111
rm -f tiamalgamation.c
68-
#rm -f -r docs
112+
rm -f -r docs
113+

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ High quality bindings are available for [Node.js](https://github.com/TulipCharts
1414

1515
## Features
1616

17-
- **ANSI C with no dependencies**.
17+
- **C99 with no dependencies**.
1818
- Uses fast algorithms.
1919
- Easy to use programming interface.
2020
- Release under LGPL license.
@@ -36,6 +36,17 @@ make
3636
You should get a static library, `libindicators.a`. You'll need that library
3737
and the header file `indicators.h` to use Tulip Indicators in your code.
3838

39+
40+
## Not Building
41+
42+
If you don't want to build the library, you can simply add the
43+
`tiamalgamation.c` file to your project, along with `indicators.h` and
44+
candles.h`. The amalgamation file contains all of Tulip Indicators - you don't
45+
actually need any of the other source files.
46+
47+
This is the recommended method to import Tulip Indicators into code for
48+
bindings to other languages, since it makes it very easy to update versions.
49+
3950
## Usage
4051

4152
For usage information, please see:
@@ -157,9 +168,12 @@ Simple
157168
todeg Vector Degree Conversion
158169
torad Vector Radian Conversion
159170
trunc Vector Truncate
171+
160172
```
161173

162174

163175
## Special Thanks
164176

165177
The stochrsi indicator was sponsored by: [Gunthy](https://gunthy.org).
178+
179+
The candle pattern recognition was sponsored by: [Algorum](https://algorumsoftware.com)

0 commit comments

Comments
 (0)