You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 03 Writing Algorithms/28 Indicators/01 Supported Indicators/107 Swiss Army Knife/02 Using SWISS Indicator.html
+26-2Lines changed: 26 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,12 @@
19
19
// The current value of _swiss is represented by itself (_swiss)
<p>For more information about this method, see the <arel="nofollow" target="_blank" class='csharp' href="https://www.lean.io/docs/v2/lean-engine/class-reference/cs/classQuantConnect_1_1Algorithm_1_1QCAlgorithm.html">QCAlgorithm class</a><arel="nofollow" target="_blank" class='python' href="https://www.lean.io/docs/v2/lean-engine/class-reference/py/QuantConnect/Algorithm/QCAlgorithm/#QuantConnect.Algorithm.QCAlgorithm.swiss">QCAlgorithm class</a>.</p>
36
48
<p>You can manually create a <code>SwissArmyKnife</code> indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.</p>
37
49
<p>Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the <codeclass="csharp">Update</code><codeclass="python">update</code> method. The indicator will only be ready after you prime it with enough data.</p>
@@ -57,6 +69,12 @@
57
69
// The current value of _swissarmyknife is represented by itself (_swissarmyknife)
<p>For more information about this indicator, see its <arel="nofollow" target="_blank" class='csharp' href="https://www.lean.io/docs/v2/lean-engine/class-reference/cs/classQuantConnect_1_1Indicators_1_1SwissArmyKnife.html">reference</a><arel="nofollow" target="_blank" class='python' href="https://www.lean.io/docs/v2/lean-engine/class-reference/py/QuantConnect/Indicators/SwissArmyKnife">reference</a>.</p>
Copy file name to clipboardExpand all lines: 03 Writing Algorithms/28 Indicators/01 Supported Indicators/107 Swiss Army Knife/04 Indicator History.html
+15-1Lines changed: 15 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,13 @@
14
14
var indicatorHistory = IndicatorHistory(_swiss, _symbol, 100, Resolution.Minute);
15
15
var timeSpanIndicatorHistory = IndicatorHistory(_swiss, _symbol, TimeSpan.FromDays(10), Resolution.Minute);
16
16
var timePeriodIndicatorHistory = IndicatorHistory(_swiss, _symbol, new DateTime(2024, 7, 1), new DateTime(2024, 7, 5), Resolution.Minute);
17
+
18
+
// Access all attributes of indicatorHistory
19
+
var gauss = indicatorHistory.Select(x => ((dynamic)x).Gauss).ToList();
20
+
var butter = indicatorHistory.Select(x => ((dynamic)x).Butter).ToList();
21
+
var highPass = indicatorHistory.Select(x => ((dynamic)x).HighPass).ToList();
22
+
var twoPoleHighPass = indicatorHistory.Select(x => ((dynamic)x).TwoPoleHighPass).ToList();
23
+
var bandPass = indicatorHistory.Select(x => ((dynamic)x).BandPass).ToList();
0 commit comments