Created
September 10, 2016 18:30
-
-
Save milktrader/f2caa53a77f1bd9a738cb7edca5dee9f to your computer and use it in GitHub Desktop.
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
macro select(ex::Expr, sym1::Symbol, ex1::Expr, sym2::Symbol, ex3::Expr) | |
ex.args, sym1, ex1.args, sym2, ex3.args | |
end | |
julia> @select open, high, close in ohlcv where close > open when day=Friday | |
(Any[:open,:high,:(close in ohlcv)],:where,Any[:>,:close,:open],:when,Any[:day,:Friday]) | |
# would be nice to do this instead of a one-liner | |
@select open, high, close | |
in ohlc | |
where open > close | |
when day = friday |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment