Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameterless contructors for some CandleStickPatterns #569

Merged
merged 9 commits into from Sep 29, 2016
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -251,4 +251,4 @@ Charts/

# NCrunch files
*.ncrunchsolution
*.ncrunchproject
*.ncrunchproject
5 changes: 3 additions & 2 deletions Algorithm/QCAlgorithm.Indicators.cs
Expand Up @@ -562,12 +562,13 @@ public Stochastic STO(Symbol symbol, int period, Resolution? resolution = null)
/// <param name="symbol">The symbol whose log return we seek</param>
/// <param name="period">The period of the log return.</param>
/// <param name="resolution">The resolution.</param>
/// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar.</param>
/// <returns>log return indicator for the requested symbol.</returns>
public LogReturn LOGR(Symbol symbol, int period, Resolution? resolution = null)
public LogReturn LOGR(Symbol symbol, int period, Resolution? resolution = null, Func<BaseData, decimal> selector = null)
{
string name = CreateIndicatorName(symbol, "LOGR", resolution);
var logr = new LogReturn(name, period);
RegisterIndicator(symbol, logr, resolution);
RegisterIndicator(symbol, logr, resolution, selector);
return logr;
}

Expand Down
10 changes: 9 additions & 1 deletion Indicators/CandlestickPatterns/AbandonedBaby.cs
Expand Up @@ -69,11 +69,19 @@ public AbandonedBaby(string name, decimal penetration = 0.3m)
/// Initializes a new instance of the <see cref="AbandonedBaby"/> class.
/// </summary>
/// <param name="penetration">Percentage of penetration of a candle within another candle</param>
public AbandonedBaby(decimal penetration = 0.3m)
public AbandonedBaby(decimal penetration)
: this("ABANDONEDBABY", penetration)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="AbandonedBaby"/> class.
/// </summary>
public AbandonedBaby()
: this("ABANDONEDBABY")
{
}

/// <summary>
/// Gets a flag indicating when this indicator is ready and fully initialized
/// </summary>
Expand Down
10 changes: 9 additions & 1 deletion Indicators/CandlestickPatterns/DarkCloudCover.cs
Expand Up @@ -57,11 +57,19 @@ public DarkCloudCover(string name, decimal penetration = 0.5m)
/// Initializes a new instance of the <see cref="DarkCloudCover"/> class.
/// </summary>
/// <param name="penetration">Percentage of penetration of a candle within another candle</param>
public DarkCloudCover(decimal penetration = 0.5m)
public DarkCloudCover(decimal penetration)
: this("DARKCLOUDCOVER", penetration)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="DarkCloudCover"/> class.
/// </summary>
public DarkCloudCover()
: this("DARKCLOUDCOVER")
{
}

/// <summary>
/// Gets a flag indicating when this indicator is ready and fully initialized
/// </summary>
Expand Down
10 changes: 9 additions & 1 deletion Indicators/CandlestickPatterns/EveningDojiStar.cs
Expand Up @@ -67,11 +67,19 @@ public EveningDojiStar(string name, decimal penetration = 0.3m)
/// Initializes a new instance of the <see cref="EveningDojiStar"/> class.
/// </summary>
/// <param name="penetration">Percentage of penetration of a candle within another candle</param>
public EveningDojiStar(decimal penetration = 0.3m)
public EveningDojiStar(decimal penetration)
: this("EVENINGDOJISTAR", penetration)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="EveningDojiStar"/> class.
/// </summary>
public EveningDojiStar()
: this("EVENINGDOJISTAR")
{
}

/// <summary>
/// Gets a flag indicating when this indicator is ready and fully initialized
/// </summary>
Expand Down
10 changes: 9 additions & 1 deletion Indicators/CandlestickPatterns/EveningStar.cs
Expand Up @@ -64,11 +64,19 @@ public EveningStar(string name, decimal penetration = 0.3m)
/// Initializes a new instance of the <see cref="EveningStar"/> class.
/// </summary>
/// <param name="penetration">Percentage of penetration of a candle within another candle</param>
public EveningStar(decimal penetration = 0.3m)
public EveningStar(decimal penetration)
: this("EVENINGSTAR", penetration)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="EveningStar"/> class.
/// </summary>
public EveningStar()
: this("EVENINGSTAR")
{
}

/// <summary>
/// Gets a flag indicating when this indicator is ready and fully initialized
/// </summary>
Expand Down
10 changes: 9 additions & 1 deletion Indicators/CandlestickPatterns/MatHold.cs
Expand Up @@ -64,11 +64,19 @@ public MatHold(string name, decimal penetration = 0.5m)
/// Initializes a new instance of the <see cref="MatHold"/> class.
/// </summary>
/// <param name="penetration">Percentage of penetration of a candle within another candle</param>
public MatHold(decimal penetration = 0.5m)
public MatHold(decimal penetration)
: this("MATHOLD", penetration)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="MatHold"/> class.
/// </summary>
public MatHold()
: this("MATHOLD")
{
}

/// <summary>
/// Gets a flag indicating when this indicator is ready and fully initialized
/// </summary>
Expand Down
10 changes: 9 additions & 1 deletion Indicators/CandlestickPatterns/MorningDojiStar.cs
Expand Up @@ -67,11 +67,19 @@ public MorningDojiStar(string name, decimal penetration = 0.3m)
/// Initializes a new instance of the <see cref="MorningDojiStar"/> class.
/// </summary>
/// <param name="penetration">Percentage of penetration of a candle within another candle</param>
public MorningDojiStar(decimal penetration = 0.3m)
public MorningDojiStar(decimal penetration)
: this("MORNINGDOJISTAR", penetration)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="MorningDojiStar"/> class.
/// </summary>
public MorningDojiStar()
: this("MORNINGDOJISTAR")
{
}

/// <summary>
/// Gets a flag indicating when this indicator is ready and fully initialized
/// </summary>
Expand Down
10 changes: 9 additions & 1 deletion Indicators/CandlestickPatterns/MorningStar.cs
Expand Up @@ -64,11 +64,19 @@ public MorningStar(string name, decimal penetration = 0.3m)
/// Initializes a new instance of the <see cref="MorningStar"/> class.
/// </summary>
/// <param name="penetration">Percentage of penetration of a candle within another candle</param>
public MorningStar(decimal penetration = 0.3m)
public MorningStar(decimal penetration)
: this("MORNINGSTAR", penetration)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="MorningStar"/> class.
/// </summary>
public MorningStar()
: this("MORNINGSTAR")
{
}

/// <summary>
/// Gets a flag indicating when this indicator is ready and fully initialized
/// </summary>
Expand Down
4 changes: 3 additions & 1 deletion UserInterface/QuantConnect.Views.csproj
Expand Up @@ -200,7 +200,9 @@
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know what this is?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I don't know.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be generated by VS2013 when a projects contains tests:
http://stackoverflow.com/questions/18614342/what-is-service-include-in-a-csproj-file-for
http://www.alteridem.net/2014/10/16/visual-studio-2013-modifies-nunit-project-files/

We have the same line in QuantConnect.Tests.csproj which is a test project, probably it was added by VS in QuantConnect.Views.csproj because it now contains tests for the new DesktopClient.

<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Baseclass.Contrib.Nuget.Output.2.2.0-xbuild02\build\net40\Baseclass.Contrib.Nuget.Output.targets" Condition="Exists('..\packages\Baseclass.Contrib.Nuget.Output.2.2.0-xbuild02\build\net40\Baseclass.Contrib.Nuget.Output.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
Expand Down