Commit Graph

861 Commits

Author SHA1 Message Date
QuantConnect 6064662514 Improves SetHolding implementation and provides tests 2015-07-21 11:14:19 -04:00
snugs 9bc0c8e450 Updates order field to properties with internal set
This is to compile break user algorithms trying to set order properties to perform order updates
2015-07-16 00:53:38 -04:00
QuantConnect fea7d4de25 Rework setholdings to allow multiple calls. Changed behavior to be VALUE not BUYING POWER 2015-07-14 15:58:44 -04:00
snugs 0d48732546 Misc fixes
Send isLiveMode directly into data readers instead of resolving from data feed endpoint
Added some expression extensions, AsEnumerable()  :)
Fixed Identity names, added optional name parameter for deconflicting
2015-07-09 22:44:12 -04:00
snugs 4cc5c1daf7 Use fill price for order value when filled 2015-07-09 18:24:03 -04:00
snugs d636b10dca Remove market price as parameter to SubmitOrderRequest 2015-07-09 11:12:18 -04:00
snugs 704bfc2298 Adds new order ticket system
QCAlgorithm order functions now return an OrderTicket

OrderTicket can be used to directly update or cancel an order

Placing an order now submits an OrderRequest which is processed by the ITransactionHandler
2015-07-08 23:40:28 -04:00
snugs 6bd38ece77 Adds international/timezone support
Time sync:
	* Data feeds are required to time sync in UTC time
	* TimeSlice.Time is now in UTC

IAlgorithm
	* Time is now exclusively the algorithm's local time zone
	* Added UtcTime
	* SetDateTime( DateTime ) accepts a UTC time and is internally converted

SubscriptionDataConfig
	* Adds market and time zone as required ctor parameters

SecurityExchange
	* Now passes most calls directly through to SecurityExchangeHours class

SecurityExchangeHours
	* Holds market hours for each day of week (LocalMarketHours)
	* Talks in terms of local times in the SecurityExchangeHours.TimeZone time zone

Data/market-hours/
	* New data folder to hold market hour information
	* Includes market-hours-database.csv to hold market hours per market/symbol/security (see doc in file)
	* Includes holidays-usa.csv to hold holidays for 'usa' market
		+ The holiday files follow the pattern 'holidays-*.csv' where * is the market

TimeKeeper
	* Receives updates in UTC time
	* Passes that to LocalTimeKeeper's who lazily evaluate the time in their respective time zones
	* Eventually this can grow to be the sole source of time in the algorithm's scope

MISC:
	* Fixes exception thrown when exiting LiveTradingDataFeed
	* Fixes exception thrown when exiting FileSystemDataFeed
	* Fixes exception thrown when exiting StatusPing
	* Simplify FillForwardEnumerator logic with GetNextMarketOpen
	* Adds many time zones, see TimeZones.cs
2015-07-08 18:45:34 -04:00
snugs 27cd4fbbe5 Fixes bug infinite loop in QCAlgorithm.OnData(Slice) 2015-07-03 17:17:45 -04:00
snugs 87554ecf0d Implements OnData(Slice) and remove v1.0 event handlers
Also cleans up IAlgorithm interface of unused/old methods
Slice is a new type that contains all the data from a time slice to be sent into an algorithm
2015-07-03 15:15:15 -04:00
snugs 9c1b0f4616 Move order/order queue storage to transaction handler
Expose order and order processing ability via IOrderProvider/IOrderProcessor
2015-07-02 15:07:35 -04:00
QuantConnect bad76583aa Merge branch 'master' of https://github.com/QuantConnect/Lean 2015-06-29 12:52:08 -04:00
QuantConnect dd506279b7 Version bump Newtonsoft and MathNumerics, strip unnessary refs 2015-06-29 12:00:46 -04:00
John Nguyen 85c8cfa3a2 Added XML documentation for Ichimoku indicator 2015-06-26 11:22:11 +08:00
John Nguyen f1d566fdd3 Added ichimoku indicator 2015-06-26 10:41:27 +08:00
snugs 82b2b7c2d7 Optionally wait for indicator to be ready before plotting 2015-06-22 17:28:18 -04:00
snugs 1cc048e481 Make PlotIndicator more generic 2015-06-22 15:02:41 -04:00
snugs 3636124c5e Misc edits from code review
Removed unused BaseDataFeed and IQFeedDataFeed
Add catch for NullReferenceException in stream store
ConsoleSetupHandler now throws on live jobs, use BrokerageSetupHandler
Renamed/moved FixedSizedQueue to Util\FixedSizeQueue
2015-06-18 17:19:36 -04:00
snugs cd7bc2d8d3 Add Identity helper with resolution, improve indicator name 2015-06-17 22:34:03 -04:00
QuantConnect 55a6215da6 Split QCAlgorithm and Algorith,CSharp into separate projects, added FSharp project for algorithms 2015-06-17 17:44:02 -04:00
snugs deb8fc5995 Fix issue with algorithm nuget packages 2015-06-17 09:45:11 -04:00
QuantConnect fde0cbed3a Strip out block quote section header comments 2015-06-13 16:04:27 -04:00
snugs cf160b49de Some fixes from SubscriptionDataSource review 2015-06-11 22:27:42 -04:00
snugs 96396c676a OBSOLETES:: BaseData.Reader and BaseData.GetSource
The existing method signatures have been made obsolete in favor of something slightly simpler and more deterministic.
The new methods accept a bool isLiveMode flag instead of the DataFeedEndpoint.
The GetSource method returns a new type: SubscriptionDataSource, which combines the source string and the SubscriptionTransportMedium.

Existing sub-types of BaseData have been updated with the new signatures.  IBaseData has not been touch as it is mostly unused by LEAN infrastructure.
2015-06-11 17:34:53 -04:00
snugs 0b1a76a030 Updates hourly/daily data to use scale factors like second/minute 2015-06-09 13:39:06 -04:00
snugs 281ada4eef Adds preorder checks for currency feeds for forex 2015-06-08 21:29:26 -04:00
David Hsieh dc7865c4d5 Amend variable name 'donchianChannel' on QCAlgorithmn.Indicator
Amend variable name on 'donchianChannel'  on QCAlgorithmn.Indicator
2015-06-04 22:51:35 +10:00
David Hsieh efbac9215d Implemented Donchian Channel indicator with accompanying tests
Implemented Donchian Channel indicator with accompanying tests
2015-06-04 22:48:29 +10:00
snugs 641d643cc3 Throw error from ResolveConsolidator if requested res too high 2015-06-03 11:19:55 -04:00
snugs 887faa24e7 Adds support for hourly/daily data to LEAN engine 2015-06-02 21:44:44 -04:00
snugs 2ef6333096 Adds reg test that relies heavily on fill forward 2015-06-01 13:56:55 -04:00
snugs 099cee9b3f Implements MarketOnOpen and MarketOnClose order types 2015-05-26 19:20:05 -04:00
snugs 4a404b968c Implements BrokerageModel 2015-05-26 10:40:25 -04:00
snugs 225eaf81c9 Initial impl of brokerage model 2015-05-23 15:44:00 -04:00
David Hsieh cf5efba946 Fix superfluous comments. 2015-05-20 00:49:53 +10:00
David Hsieh 696eed5b4a Implemented minor fixes to conform to standards. 2015-05-20 00:47:53 +10:00
David Hsieh 526ca0292b Implemented the Average Directional Index Indicator with accompanying test data and unit tests.
Implemented the Average Directional Index Indicator with accompanying
test data and unit tests.
2015-05-19 23:07:17 +10:00
snugs df7ae5b63b Adds volume to Field selector class 2015-05-19 00:24:27 -04:00
QuantConnect 0478490e62 Added helper overload for STO, fix comments 2015-05-17 15:27:43 -04:00
QuantConnect a449048de2 Added Stochastic helper method 2015-05-17 15:24:38 -04:00
QuantConnect ac3b51ca83 Rename OnBalanceVolume helper method to OBV 2015-05-17 14:21:43 -04:00
snugs 89b6e98af8 Fixes warnings mostly relating to xml comments
Also cleans up some block comments

Via PR#72 - thanks @ammachado!
2015-05-13 10:56:47 -04:00
Michael a443071fe2 Merge pull request #81 from bizcad/issue-79/Assure-Sell-quantity-is-negative
Closes #79 - Thanks for another amazing contribution @bizcad!!
2015-05-13 10:05:52 -04:00
snugs e1827fae31 Implements OnMarginCall and OnMarginCallWarning events
Also fixes bug in ConsoleResultHandler to process log/debug/error messages synchronously
2015-05-12 18:16:25 -04:00
snugs ffd7d99aa3 Adds Field.cs static class for indicator selectors
Adds PlotIndicator which wires up event to plot on new values
2015-05-11 21:33:30 -04:00
bizcad e4f5219a7f Update origin master from upstream 2015-05-09 20:38:02 -07:00
bizcad bed1941b77 issue-79/Assure-Sell-quantity-is-negative 2015-05-09 19:18:30 -07:00
snugs dfdd29195b Modifies stream symbols algo to randomly select symbols 2015-05-06 10:22:38 -04:00
snugs 449150f71e Fixes SetHoldings when crossing zero line
Improves margin remaining computation as well
2015-05-05 21:07:03 -04:00
snugs 9dd02c0271 SetHoldings bail if margin rem less than per share 2015-05-04 22:29:55 -04:00