Skip to content

Instantly share code, notes, and snippets.

@milktrader
Created January 17, 2014 04:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save milktrader/8468295 to your computer and use it in GitHub Desktop.
Save milktrader/8468295 to your computer and use it in GitHub Desktop.
long macro
julia> using TradeModels, MarketData
julia> @long cl rsi (.>) 50 nextday op
0.3999243140318183
@milktrader
Copy link
Author

This is an annualized return, but it's not tested to be accurate. Currently just a hack

@milktrader
Copy link
Author

what about this?

julia> @long op cl rsi (.>) 50

@milktrader
Copy link
Author

Or this?

julia> rsi50 = tradesignal(rsi(cl), 50, .>)

julia> @long op rsi50

@milktrader
Copy link
Author

Well, you can't loop over the last one, so that's out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment