{"action":"created","issue":{"url":"https://api.github.com/repos/QuantConnect/Lean/issues/1781","repository_url":"https://api.github.com/repos/QuantConnect/Lean","labels_url":"https://api.github.com/repos/QuantConnect/Lean/issues/1781/labels{/name}","comments_url":"https://api.github.com/repos/QuantConnect/Lean/issues/1781/comments","events_url":"https://api.github.com/repos/QuantConnect/Lean/issues/1781/events","html_url":"https://github.com/QuantConnect/Lean/pull/1781","id":308671058,"number":1781,"title":"Add rsi alpha model","user":{"login":"mchandschuh","id":531416,"avatar_url":"https://avatars2.githubusercontent.com/u/531416?v=4","gravatar_id":"","url":"https://api.github.com/users/mchandschuh","html_url":"https://github.com/mchandschuh","followers_url":"https://api.github.com/users/mchandschuh/followers","following_url":"https://api.github.com/users/mchandschuh/following{/other_user}","gists_url":"https://api.github.com/users/mchandschuh/gists{/gist_id}","starred_url":"https://api.github.com/users/mchandschuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mchandschuh/subscriptions","organizations_url":"https://api.github.com/users/mchandschuh/orgs","repos_url":"https://api.github.com/users/mchandschuh/repos","events_url":"https://api.github.com/users/mchandschuh/events{/privacy}","received_events_url":"https://api.github.com/users/mchandschuh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-26T17:46:11Z","updated_at":"2018-03-26T21:25:56Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/QuantConnect/Lean/pulls/1781","html_url":"https://github.com/QuantConnect/Lean/pull/1781","diff_url":"https://github.com/QuantConnect/Lean/pull/1781.diff","patch_url":"https://github.com/QuantConnect/Lean/pull/1781.patch"},"body":"<!--- Provide a general summary of your changes in the Title above -->\r\n\r\n#### Description\r\n<!--- Describe your changes in detail -->\r\nDefines a new `RsiAlphaModel` that uses Wilder's RSI as a signal source.\r\nThis PR also includes a fix for `PortofolioTarget.Percent` to properly use the buying power model when determining how much quantity to purchase. Without this change, 99% of the generated orders were failing as invalid (insufficient funds), but now they're working :)\r\n\r\n#### Related Issue\r\n<!--- This project only accepts pull requests related to open issues -->\r\n<!--- If suggesting a new feature or change, please discuss it in an issue first -->\r\n<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->\r\n<!--- Please link to the issue here: -->\r\nCloses #1779 \r\n\r\n#### Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\nThis is part of a continued effort to fill out some example models in the framework ecosystem.\r\n\r\n#### Requires Documentation Change\r\n<!--- Please indicate if these changes will require updates to documentation, and if so, specify what changes are required -->\r\nYes. This should be included in documentation.\r\n\r\n#### How Has This Been Tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\n<!--- see how your change affects other areas of the code, etc. -->\r\nQC production.\r\n\r\n#### Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Non-functional change (xml comments/documentation/ect)\r\n\r\n#### Checklist:\r\n<!--- The following is a checklist of items that MUST be completed before a PR is accepted -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [x] My code follows the code style of this project.\r\n- [x] I have read the **CONTRIBUTING** [document](https://github.com/QuantConnect/Lean/blob/master/CONTRIBUTING.md).\r\n- [ ] I have added tests to cover my changes. <!--- If not applicable, please explain why -->\r\n- [x] All new and existing tests passed.\r\n- [x] My branch follows the naming convention `bug-<issue#>-<description` or `feature-<issue#>-<description>`\r\n\r\n<!--- Template inspired by https://www.talater.com/open-source-templates/#/page/99 -->"},"comment":{"url":"https://api.github.com/repos/QuantConnect/Lean/issues/comments/376317100","html_url":"https://github.com/QuantConnect/Lean/pull/1781#issuecomment-376317100","issue_url":"https://api.github.com/repos/QuantConnect/Lean/issues/1781","id":376317100,"user":{"login":"jaredbroad","id":2243225,"avatar_url":"https://avatars2.githubusercontent.com/u/2243225?v=4","gravatar_id":"","url":"https://api.github.com/users/jaredbroad","html_url":"https://github.com/jaredbroad","followers_url":"https://api.github.com/users/jaredbroad/followers","following_url":"https://api.github.com/users/jaredbroad/following{/other_user}","gists_url":"https://api.github.com/users/jaredbroad/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredbroad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredbroad/subscriptions","organizations_url":"https://api.github.com/users/jaredbroad/orgs","repos_url":"https://api.github.com/users/jaredbroad/repos","events_url":"https://api.github.com/users/jaredbroad/events{/privacy}","received_events_url":"https://api.github.com/users/jaredbroad/received_events","type":"User","site_admin":false},"created_at":"2018-03-26T21:25:55Z","updated_at":"2018-03-26T21:25:55Z","author_association":"OWNER","body":"We also discussed lots of goodies for another day:\r\n\r\n1) `IIndicator.WarmUp()` to skip the need to manually warm up anything or next best: `algorithm.WarmUpIndicator(indicator)`\r\n\r\n2) Removing the need for symbolData entirely by designing mostly around the updated events; \r\n```\r\nvar signal = fast.Over(slow);\r\nsignal.Updated += (sender, current) => {  do logic, if detect cross, fire insight event }\r\n```\r\n\r\n3) Adding `IIndicator.WarmUpPeriod` -- so we know easily how many points an indicator requires to get warmed."}}
{"actor":{"display_login":"jaredbroad"}}