-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ib-fix-cci
- Loading branch information
Showing
12 changed files
with
95 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ makedocs( | |
"volatility.md", | ||
"volume.md", | ||
"candlesticks.md", | ||
"utils.md", | ||
] | ||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,5 +15,6 @@ Pages = [ | |
"volatility.md", | ||
"volume.md", | ||
"candlesticks.md", | ||
"utils.md", | ||
] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Utilities | ||
|
||
## Typical Price | ||
|
||
```@docs | ||
typical | ||
``` | ||
|
||
```@repl | ||
using MarketData | ||
using MarketTechnicals | ||
merge(ohlc, typical(ohlc)) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
facts("Utilities") do | ||
|
||
context("Base.abs returns all positive numbers") do | ||
@fact sum((abs(cl .- op) .>= 0).values) --> length(cl) | ||
end | ||
context("typical price") do | ||
|
||
context("pad correctly pads NaN values for non-existent values") do | ||
@fact sum((abs(cl .- op) .>= 0).values) --> length(cl) | ||
end | ||
ts = collect(Date(2017, 5, 1):Date(2017, 5, 5)) | ||
ta = typical( | ||
TimeArray(ts, reshape(1:15, (5, 3)), ["High", "Low", "Close"])) | ||
|
||
context("pad correctly pads NaN values for missing values") do | ||
@fact sum((abs(cl .- op) .>= 0).values) --> length(cl) | ||
@fact ta.timestamp[1] --> Date(2017, 5, 1) | ||
@fact ta.timestamp[end] --> Date(2017, 5, 5) | ||
@fact ta.values --> [6, 7, 8, 9, 10] | ||
end | ||
end |