Commit Graph

282 Commits

Author SHA1 Message Date
adam-may 03efc1b735 Remove internal usages of implicit operator in Indicator code (#4844)
* Convert usages of implicit operator in IndicatorBase and IndicatorDataPoint

* Reverting changes to example code
2020-10-12 10:31:05 -03:00
Colton Sellers d3ccc14fcd Unit test for RegisterIndicator in Python (#4676) 2020-08-31 19:11:24 -03:00
Colton Sellers b8674731a5 Feature 2456 custom Python consolidator support (#4637)
* DataConsolidator Wrapper for Python Consolidators

* Regression Unit Test

* Refactor Regression test

* Bad test fix

* pre review

* self review

* Add RegisterIndicator for Python Consolidator

* Python base class for consolidators

* Modify regression algo to register indicator

* unit test - attach event

* Test fix

* Fix test python imports

* Add license header file and null check

Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
2020-08-25 17:26:55 -03:00
Jovad Uribe fc6ccdbc11 Feature emv indicator addition (#4591)
* Create EaseOfMovementValue.cs

Added ease of movement file

* Update EaseOfMovementValue.cs

Added calculation for EMV and return its value

* Update EaseOfMovementValue.cs

* Update EaseOfMovementValue.cs

* Update EaseOfMovementValue.cs

* Update EaseOfMovementValue.cs

Rearranged code and removed all IndicatorBases

* Update EaseOfMovementValue.cs

* Update EaseOfMovementValue.cs

Added Min and Max Indicator

* Added Tests and Compile

* Fixed Bugs and Removed Reset

* Added Current Value and revereted to Bar data

* Fixed test file and refined indicator file

* TradeBar to IBaseDataBar

* Bug fixes

* bug fix

* Switching to TradeBar and attempting to fix Volume bug

There are two bugs that I have been having trouble fixing. 1. Cannot implicitly convert decimal to int (simple fix but cannot find where bug is taking place)
2. IBaseDataBar does not contain a definition for Volume

* Update EaseOfMovementValueTests.cs

* bug fix

* added data

* updated assertion

* added reset

* Update EaseOfMovementValueTests.cs

* Update EaseOfMovementValue.cs

* Update spy_emv.txt

I had the wrong test data in. Was throwing failed test for many pull requests.

* Update EaseOfMovementValue.cs

* Update EaseOfMovementValue.cs

* Update EaseOfMovementValue.cs

* Update EaseOfMovementValue.cs

* Cleaned Data

* Bug fixes

Fixed zero division error. Used better Test Data.

* removed readonly from _previous...price

* Update EaseOfMovementValue.cs

* Update EaseOfMovementValue.cs

* Update EaseOfMovementValue.cs

* bug fix

* Test Bug Fix

* EMV data from online

* Cosmetics

* Out of bounds fix

* Update EaseOfMovementValueTests.cs

* Update spy_emv.txt

* Update spy_emv.txt

* Added changes requested

Placed constructor first, fixed nullable type if statement, set 10,000 to default argument, added SMA.

* Update EaseOfMovementValue.cs

added variables

* Update EaseOfMovementValue.cs

* Update EaseOfMovementValue.cs

* Update EaseOfMovementValue.cs

* Fixed bugs

* Changed Delta, Added Assert

Create Indicator -> Update EMV -> Assert Status. Also changed delta from 1 to 0.000001 to improve test accuracy.

* Added unit test testing the SMA
2020-08-24 09:54:58 -03:00
Adalyat Nazirov 1c9b817960 Track indicator previous input per symbol individually (#4607)
* track previous input per symbol

* improve Arms Index period checks

* don't need to be thread safe due to consolidators update are sequential

* Use TryGetValue for performance

- Minor update for AdvanceDeclineIndicator to use TryGetValue to reduce
  amount of dictionary access

Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
2020-08-02 20:13:27 -03:00
Adalyat Nazirov c2cac7fbee remove unused using 2020-07-31 22:03:57 +03:00
Adalyat Nazirov df9c1973da fix warmup process; handle not ordered bars 2020-07-31 21:39:31 +03:00
Adalyat Nazirov bfb13e46c8 improve warming indicator up 2020-07-31 21:13:56 +03:00
Adalyat Nazirov 59286bb750 handle missing values 2020-07-31 21:13:56 +03:00
Adalyat Nazirov 939b334478 test RemoveStock method 2020-07-31 21:13:56 +03:00
Adalyat Nazirov a044cd6416 fix TRIN 2020-07-31 17:53:56 +03:00
Adalyat Nazirov 3f556d70ec A/D Volume Ratio: wip 2020-07-31 17:53:55 +03:00
Adalyat Nazirov 220ccbae7c A/D Ratio : wip 2020-07-31 17:53:55 +03:00
Adalyat Nazirov a6d1908aa9 TRIN 2020-07-31 17:53:55 +03:00
Adalyat Nazirov 99aa1eadd7 create A/D Volume Ratio indicator 2020-07-31 17:53:55 +03:00
Adalyat Nazirov d53f79b271 create A/D Ratio indicator class 2020-07-31 17:53:55 +03:00
Adalyat Nazirov fad38f8ed4 [tmp] generate equity, but need generic method to parse symbol 2020-07-31 17:53:55 +03:00
Adalyat Nazirov c7091dbf6b parse Symbol if exists 2020-07-31 17:53:55 +03:00
Adalyat Nazirov 5278a3dd02 too many code duplications
reuse existing GetCsvFileStream for streaming file data
2020-07-31 17:53:54 +03:00
Colton Sellers 835658ec3e Overwriting assertion to allow a greater variance 2020-07-28 14:34:08 -07:00
Colton Sellers c171431e3f Got a test file for Schaffs Trend Cycle 2020-07-28 14:34:07 -07:00
Colton Sellers c611e65f1e Addition of SchaffTrendCycle +Tests 2020-07-28 14:34:07 -07:00
Jonathan Wheeler 8903942e3d Merge branch 'master' of https://github.com/QuantConnect/Lean into bug-4540-heikinashi-indicator-fix-for-symbol-and-volume 2020-07-24 12:05:13 -04:00
Adalyat Nazirov 5f7b58bc09 More Bollinger Indicators 2020-06-30 11:02:59 +03:00
Jonathan Wheeler d80dc2b49b Heikin-Ashi Indicator Fix for Symbol and Volume Information 2020-06-26 12:24:04 -04:00
Martin Molinero e73e927c0f Enable parallel unit testing 2020-04-27 17:45:53 -03:00
Martin Molinero 886e5e6445 Test fixes and updates 2020-04-23 09:59:31 -03:00
Leonardo-Ferreira 8d31b4ee8e Update the Expected Exception 2020-04-22 18:19:08 -03:00
Juan José D'Ambrosio 9867102c4f Merge pull request #4218 from QuantConnect/feature-3589-support-equity-quotes-v2
Adding Support for Equity L1 Quote Data
2020-04-07 11:43:52 -03:00
Martin Molinero 499248fe12 Revert "Revert "Adding Support for Equity L1 Quote Data""
This reverts commit 8cd8d206ca.
2020-04-06 10:32:59 -03:00
AlexCatarino 4beddaafa7 Fixes IndicatorBase.Update Method Timestamping
`IndicatorBase.Update` use `input.EndTime` instead of `input.Time` so that `input.Current.Time` (and `EndTime`) matches the `input.EndTime` and achieve consistent behavior across different indicator types (`IndicatorDataPoint`, `IBaseDataBar` and `TradeBar`)
2020-04-04 23:01:24 +01:00
Martin-Molinero 52139ca5f1 Merge pull request #4184 from QuantConnect/bug-4007-rsi-division-by-zero
Fix DivideByZeroException in RSI indicator
2020-03-17 16:36:34 -03:00
Stefano Raggi 7e92dbaff9 Update RSI to handle negative averages 2020-03-17 20:12:34 +01:00
Jared 8cd8d206ca Revert "Adding Support for Equity L1 Quote Data" 2020-03-11 19:16:05 -07:00
Stefano Raggi 623398deb9 Fix DivideByZeroException in RSI indicator 2020-03-12 00:32:39 +01:00
Martin Molinero 21f636fecc Fix undeterministic unit test
- Fix underterministic python indicator unit test
- Refactor `QCAlgorithm.Indicators.GetSubscriptions`
2020-03-11 14:34:13 -03:00
Juan José D'Ambrosio 2f654bdc8e Address review 2019-11-15 14:43:01 +00:00
Juan José D'Ambrosio 4659f919c9 Implement more general robust checking 2019-11-15 10:55:27 +00:00
Juan José D'Ambrosio 78894d40ea Fix IndicatorBase.Equal implementation
Add generic test
2019-11-14 12:24:30 +00:00
AlexCatarino eb571937b2 Implements Backward Compatibility for Python Custom Indicator 2019-10-04 19:12:11 +01:00
Michael Handschuh 35dcec2dc4 Update Tests to respect CA1304 and CA1305
Updates all occurrences of parsing/ToString-ing to go through the new
StringExtensions methods that use CultureInfo.InvariantCulture

See #3045
2019-09-12 15:30:46 -04:00
AlexCatarino 22723204ff Fixes VolumeWeightedAveragePriceExecutionModel.IntradayVwap
`VolumeWeightedAveragePriceExecutionModel.IntradayVwap.Update` did not return a boolean.
2019-07-29 11:28:06 +01:00
AlexCatarino 0b0a1b31ff Refactors PythonIndicator
In order to provide full Lean Indicator functionality to python custom indicators, they need to inherit from a C# class. `PythonIndicator` will serve for this purpose.
Algorithms can use the former version (no inheritance).
2019-07-26 00:35:57 +01:00
AlexCatarino d9be8e5001 Extends SwissArmyKnife, Trix and WilderMovingAverage Indicators With IIndicatorWarmUpPeriodProvider 2019-06-05 18:10:22 +01:00
Jared d19402592d Merge pull request #3226 from AlexCatarino/feature-3074-indicator-warmup-t3-trime-tema
Extends T3, Triangular and TripleExponential Moving Averages Indicators With IIndicatorWarmUpPeriodProvider
2019-05-28 10:14:51 -07:00
Jared 9373d2f56d Merge pull request #3225 from AlexCatarino/feature-3074-indicator-warmup-obv-psar-rc
Extends OnBalanceVolume, ParabolicStopAndReverse and RegressionChannel Indicators With IIndicatorWarmUpPeriodProvider
2019-05-28 09:25:07 -07:00
AlexCatarino dc254945f8 Extends T3, Triangular and TripleExponential Moving Averages Indicators With IIndicatorWarmUpPeriodProvider 2019-05-23 10:18:24 +01:00
AlexCatarino 1163f9c663 Extends OnBalanceVolume, ParabolicStopAndReverse and RegressionChannel Indicators With IIndicatorWarmUpPeriodProvider 2019-05-23 10:08:48 +01:00
AlexCatarino 20aad77176 Addresses Peer-Review 2019-05-23 09:59:03 +01:00
AlexCatarino 30bc74984e Extends RelativeStrengthIndex, Stochastic and WilliamsPercentR Indicators With IIndicatorWarmUpPeriodProvider 2019-05-23 09:54:02 +01:00