{"action":"created","comment":{"url":"https://api.github.com/repos/QuantConnect/Lean/pulls/comments/94916917","pull_request_review_id":15458863,"id":94916917,"diff_hunk":"@@ -884,13 +927,31 @@ private static void HandleDelistedSymbols(IAlgorithm algorithm, Delistings newDe\n                 // submit an order to liquidate on market close\n                 if (delisting.Type == DelistingType.Warning)\n                 {\n-                    delistings.Add(delisting);\n+\t                SubmitOrderRequest request;\n+\n+\t                delistings.Add(delisting);\n                     Log.Trace(\"AlgorithmManager.Run(): Security delisting warning: \" + delisting.Symbol.ID);\n                     var security = algorithm.Securities[delisting.Symbol];\n                     if (security.Holdings.Quantity == 0) continue;\n-                    var submitOrderRequest = new SubmitOrderRequest(OrderType.MarketOnClose, security.Type, security.Symbol,\n-                        -security.Holdings.Quantity, 0, 0, algorithm.UtcTime, \"Liquidate from delisting\");\n-                    var ticket = algorithm.Transactions.ProcessRequest(submitOrderRequest);\n+\n+                    if (security.Type == SecurityType.Option)","path":"Engine/AlgorithmManager.cs","position":86,"original_position":86,"commit_id":"d5cc022867b80eff8dd9d98f3e34582c663f1b6b","original_commit_id":"d5cc022867b80eff8dd9d98f3e34582c663f1b6b","user":{"login":"quant1729","id":11757550,"avatar_url":"https://avatars.githubusercontent.com/u/11757550?v=3","gravatar_id":"","url":"https://api.github.com/users/quant1729","html_url":"https://github.com/quant1729","followers_url":"https://api.github.com/users/quant1729/followers","following_url":"https://api.github.com/users/quant1729/following{/other_user}","gists_url":"https://api.github.com/users/quant1729/gists{/gist_id}","starred_url":"https://api.github.com/users/quant1729/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quant1729/subscriptions","organizations_url":"https://api.github.com/users/quant1729/orgs","repos_url":"https://api.github.com/users/quant1729/repos","events_url":"https://api.github.com/users/quant1729/events{/privacy}","received_events_url":"https://api.github.com/users/quant1729/received_events","type":"User","site_admin":false},"body":"Yes, true. I like such code snippets. Their concentration in the code shows the spots that need refactoring (adding new extension points). Like this piece signals that we need to refactor it later. This piece needs refactoring for a different reason: sending MOC orders on the last day can be error prone - many things can happen from the moment it is submitted till the end of day. ","created_at":"2017-01-06T09:00:40Z","updated_at":"2017-01-06T09:00:40Z","html_url":"https://github.com/QuantConnect/Lean/pull/668#discussion_r94916917","pull_request_url":"https://api.github.com/repos/QuantConnect/Lean/pulls/668","_links":{"self":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/comments/94916917"},"html":{"href":"https://github.com/QuantConnect/Lean/pull/668#discussion_r94916917"},"pull_request":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/668"}}},"pull_request":{"url":"https://api.github.com/repos/QuantConnect/Lean/pulls/668","id":99708231,"html_url":"https://github.com/QuantConnect/Lean/pull/668","diff_url":"https://github.com/QuantConnect/Lean/pull/668.diff","patch_url":"https://github.com/QuantConnect/Lean/pull/668.patch","issue_url":"https://api.github.com/repos/QuantConnect/Lean/issues/668","number":668,"state":"open","locked":false,"title":"Futures and options ","user":{"login":"quant1729","id":11757550,"avatar_url":"https://avatars.githubusercontent.com/u/11757550?v=3","gravatar_id":"","url":"https://api.github.com/users/quant1729","html_url":"https://github.com/quant1729","followers_url":"https://api.github.com/users/quant1729/followers","following_url":"https://api.github.com/users/quant1729/following{/other_user}","gists_url":"https://api.github.com/users/quant1729/gists{/gist_id}","starred_url":"https://api.github.com/users/quant1729/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quant1729/subscriptions","organizations_url":"https://api.github.com/users/quant1729/orgs","repos_url":"https://api.github.com/users/quant1729/repos","events_url":"https://api.github.com/users/quant1729/events{/privacy}","received_events_url":"https://api.github.com/users/quant1729/received_events","type":"User","site_admin":false},"body":"Support for futures and options live trading, data streaming, backtesting.  ","created_at":"2016-12-29T23:11:58Z","updated_at":"2017-01-06T09:00:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f0f352796feb947a0f6ca8995d726c772937d202","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/QuantConnect/Lean/pulls/668/commits","review_comments_url":"https://api.github.com/repos/QuantConnect/Lean/pulls/668/comments","review_comment_url":"https://api.github.com/repos/QuantConnect/Lean/pulls/comments{/number}","comments_url":"https://api.github.com/repos/QuantConnect/Lean/issues/668/comments","statuses_url":"https://api.github.com/repos/QuantConnect/Lean/statuses/d5cc022867b80eff8dd9d98f3e34582c663f1b6b","head":{"label":"QuantConnect:futures","ref":"futures","sha":"d5cc022867b80eff8dd9d98f3e34582c663f1b6b","user":{"login":"QuantConnect","id":3912814,"avatar_url":"https://avatars.githubusercontent.com/u/3912814?v=3","gravatar_id":"","url":"https://api.github.com/users/QuantConnect","html_url":"https://github.com/QuantConnect","followers_url":"https://api.github.com/users/QuantConnect/followers","following_url":"https://api.github.com/users/QuantConnect/following{/other_user}","gists_url":"https://api.github.com/users/QuantConnect/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantConnect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantConnect/subscriptions","organizations_url":"https://api.github.com/users/QuantConnect/orgs","repos_url":"https://api.github.com/users/QuantConnect/repos","events_url":"https://api.github.com/users/QuantConnect/events{/privacy}","received_events_url":"https://api.github.com/users/QuantConnect/received_events","type":"Organization","site_admin":false},"repo":{"id":27251463,"name":"Lean","full_name":"QuantConnect/Lean","owner":{"login":"QuantConnect","id":3912814,"avatar_url":"https://avatars.githubusercontent.com/u/3912814?v=3","gravatar_id":"","url":"https://api.github.com/users/QuantConnect","html_url":"https://github.com/QuantConnect","followers_url":"https://api.github.com/users/QuantConnect/followers","following_url":"https://api.github.com/users/QuantConnect/following{/other_user}","gists_url":"https://api.github.com/users/QuantConnect/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantConnect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantConnect/subscriptions","organizations_url":"https://api.github.com/users/QuantConnect/orgs","repos_url":"https://api.github.com/users/QuantConnect/repos","events_url":"https://api.github.com/users/QuantConnect/events{/privacy}","received_events_url":"https://api.github.com/users/QuantConnect/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/QuantConnect/Lean","description":"Lean Algorithmic Trading Engine by QuantConnect (C#, Python, F#, VB, Java)","fork":false,"url":"https://api.github.com/repos/QuantConnect/Lean","forks_url":"https://api.github.com/repos/QuantConnect/Lean/forks","keys_url":"https://api.github.com/repos/QuantConnect/Lean/keys{/key_id}","collaborators_url":"https://api.github.com/repos/QuantConnect/Lean/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/QuantConnect/Lean/teams","hooks_url":"https://api.github.com/repos/QuantConnect/Lean/hooks","issue_events_url":"https://api.github.com/repos/QuantConnect/Lean/issues/events{/number}","events_url":"https://api.github.com/repos/QuantConnect/Lean/events","assignees_url":"https://api.github.com/repos/QuantConnect/Lean/assignees{/user}","branches_url":"https://api.github.com/repos/QuantConnect/Lean/branches{/branch}","tags_url":"https://api.github.com/repos/QuantConnect/Lean/tags","blobs_url":"https://api.github.com/repos/QuantConnect/Lean/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/QuantConnect/Lean/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/QuantConnect/Lean/git/refs{/sha}","trees_url":"https://api.github.com/repos/QuantConnect/Lean/git/trees{/sha}","statuses_url":"https://api.github.com/repos/QuantConnect/Lean/statuses/{sha}","languages_url":"https://api.github.com/repos/QuantConnect/Lean/languages","stargazers_url":"https://api.github.com/repos/QuantConnect/Lean/stargazers","contributors_url":"https://api.github.com/repos/QuantConnect/Lean/contributors","subscribers_url":"https://api.github.com/repos/QuantConnect/Lean/subscribers","subscription_url":"https://api.github.com/repos/QuantConnect/Lean/subscription","commits_url":"https://api.github.com/repos/QuantConnect/Lean/commits{/sha}","git_commits_url":"https://api.github.com/repos/QuantConnect/Lean/git/commits{/sha}","comments_url":"https://api.github.com/repos/QuantConnect/Lean/comments{/number}","issue_comment_url":"https://api.github.com/repos/QuantConnect/Lean/issues/comments{/number}","contents_url":"https://api.github.com/repos/QuantConnect/Lean/contents/{+path}","compare_url":"https://api.github.com/repos/QuantConnect/Lean/compare/{base}...{head}","merges_url":"https://api.github.com/repos/QuantConnect/Lean/merges","archive_url":"https://api.github.com/repos/QuantConnect/Lean/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/QuantConnect/Lean/downloads","issues_url":"https://api.github.com/repos/QuantConnect/Lean/issues{/number}","pulls_url":"https://api.github.com/repos/QuantConnect/Lean/pulls{/number}","milestones_url":"https://api.github.com/repos/QuantConnect/Lean/milestones{/number}","notifications_url":"https://api.github.com/repos/QuantConnect/Lean/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/QuantConnect/Lean/labels{/name}","releases_url":"https://api.github.com/repos/QuantConnect/Lean/releases{/id}","deployments_url":"https://api.github.com/repos/QuantConnect/Lean/deployments","created_at":"2014-11-28T04:20:19Z","updated_at":"2017-01-06T08:51:25Z","pushed_at":"2017-01-06T00:30:20Z","git_url":"git://github.com/QuantConnect/Lean.git","ssh_url":"git@github.com:QuantConnect/Lean.git","clone_url":"https://github.com/QuantConnect/Lean.git","svn_url":"https://github.com/QuantConnect/Lean","homepage":"https://lean.quantconnect.com","size":127602,"stargazers_count":689,"watchers_count":689,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":463,"mirror_url":null,"open_issues_count":44,"forks":463,"open_issues":44,"watchers":689,"default_branch":"master"}},"base":{"label":"QuantConnect:master","ref":"master","sha":"fe5c9830e0c59cd9ab67b30add2c1f1bdb7bad5e","user":{"login":"QuantConnect","id":3912814,"avatar_url":"https://avatars.githubusercontent.com/u/3912814?v=3","gravatar_id":"","url":"https://api.github.com/users/QuantConnect","html_url":"https://github.com/QuantConnect","followers_url":"https://api.github.com/users/QuantConnect/followers","following_url":"https://api.github.com/users/QuantConnect/following{/other_user}","gists_url":"https://api.github.com/users/QuantConnect/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantConnect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantConnect/subscriptions","organizations_url":"https://api.github.com/users/QuantConnect/orgs","repos_url":"https://api.github.com/users/QuantConnect/repos","events_url":"https://api.github.com/users/QuantConnect/events{/privacy}","received_events_url":"https://api.github.com/users/QuantConnect/received_events","type":"Organization","site_admin":false},"repo":{"id":27251463,"name":"Lean","full_name":"QuantConnect/Lean","owner":{"login":"QuantConnect","id":3912814,"avatar_url":"https://avatars.githubusercontent.com/u/3912814?v=3","gravatar_id":"","url":"https://api.github.com/users/QuantConnect","html_url":"https://github.com/QuantConnect","followers_url":"https://api.github.com/users/QuantConnect/followers","following_url":"https://api.github.com/users/QuantConnect/following{/other_user}","gists_url":"https://api.github.com/users/QuantConnect/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantConnect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantConnect/subscriptions","organizations_url":"https://api.github.com/users/QuantConnect/orgs","repos_url":"https://api.github.com/users/QuantConnect/repos","events_url":"https://api.github.com/users/QuantConnect/events{/privacy}","received_events_url":"https://api.github.com/users/QuantConnect/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/QuantConnect/Lean","description":"Lean Algorithmic Trading Engine by QuantConnect (C#, Python, F#, VB, Java)","fork":false,"url":"https://api.github.com/repos/QuantConnect/Lean","forks_url":"https://api.github.com/repos/QuantConnect/Lean/forks","keys_url":"https://api.github.com/repos/QuantConnect/Lean/keys{/key_id}","collaborators_url":"https://api.github.com/repos/QuantConnect/Lean/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/QuantConnect/Lean/teams","hooks_url":"https://api.github.com/repos/QuantConnect/Lean/hooks","issue_events_url":"https://api.github.com/repos/QuantConnect/Lean/issues/events{/number}","events_url":"https://api.github.com/repos/QuantConnect/Lean/events","assignees_url":"https://api.github.com/repos/QuantConnect/Lean/assignees{/user}","branches_url":"https://api.github.com/repos/QuantConnect/Lean/branches{/branch}","tags_url":"https://api.github.com/repos/QuantConnect/Lean/tags","blobs_url":"https://api.github.com/repos/QuantConnect/Lean/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/QuantConnect/Lean/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/QuantConnect/Lean/git/refs{/sha}","trees_url":"https://api.github.com/repos/QuantConnect/Lean/git/trees{/sha}","statuses_url":"https://api.github.com/repos/QuantConnect/Lean/statuses/{sha}","languages_url":"https://api.github.com/repos/QuantConnect/Lean/languages","stargazers_url":"https://api.github.com/repos/QuantConnect/Lean/stargazers","contributors_url":"https://api.github.com/repos/QuantConnect/Lean/contributors","subscribers_url":"https://api.github.com/repos/QuantConnect/Lean/subscribers","subscription_url":"https://api.github.com/repos/QuantConnect/Lean/subscription","commits_url":"https://api.github.com/repos/QuantConnect/Lean/commits{/sha}","git_commits_url":"https://api.github.com/repos/QuantConnect/Lean/git/commits{/sha}","comments_url":"https://api.github.com/repos/QuantConnect/Lean/comments{/number}","issue_comment_url":"https://api.github.com/repos/QuantConnect/Lean/issues/comments{/number}","contents_url":"https://api.github.com/repos/QuantConnect/Lean/contents/{+path}","compare_url":"https://api.github.com/repos/QuantConnect/Lean/compare/{base}...{head}","merges_url":"https://api.github.com/repos/QuantConnect/Lean/merges","archive_url":"https://api.github.com/repos/QuantConnect/Lean/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/QuantConnect/Lean/downloads","issues_url":"https://api.github.com/repos/QuantConnect/Lean/issues{/number}","pulls_url":"https://api.github.com/repos/QuantConnect/Lean/pulls{/number}","milestones_url":"https://api.github.com/repos/QuantConnect/Lean/milestones{/number}","notifications_url":"https://api.github.com/repos/QuantConnect/Lean/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/QuantConnect/Lean/labels{/name}","releases_url":"https://api.github.com/repos/QuantConnect/Lean/releases{/id}","deployments_url":"https://api.github.com/repos/QuantConnect/Lean/deployments","created_at":"2014-11-28T04:20:19Z","updated_at":"2017-01-06T08:51:25Z","pushed_at":"2017-01-06T00:30:20Z","git_url":"git://github.com/QuantConnect/Lean.git","ssh_url":"git@github.com:QuantConnect/Lean.git","clone_url":"https://github.com/QuantConnect/Lean.git","svn_url":"https://github.com/QuantConnect/Lean","homepage":"https://lean.quantconnect.com","size":127602,"stargazers_count":689,"watchers_count":689,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":463,"mirror_url":null,"open_issues_count":44,"forks":463,"open_issues":44,"watchers":689,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/668"},"html":{"href":"https://github.com/QuantConnect/Lean/pull/668"},"issue":{"href":"https://api.github.com/repos/QuantConnect/Lean/issues/668"},"comments":{"href":"https://api.github.com/repos/QuantConnect/Lean/issues/668/comments"},"review_comments":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/668/comments"},"review_comment":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/668/commits"},"statuses":{"href":"https://api.github.com/repos/QuantConnect/Lean/statuses/d5cc022867b80eff8dd9d98f3e34582c663f1b6b"}}}}
{"actor":{"display_login":"quant1729"}}