Skip to content

Commit 8b10d5f

Browse files
1.0.1 Added Source Parameter
1 parent f1614d0 commit 8b10d5f

File tree

4 files changed

+72
-45
lines changed

4 files changed

+72
-45
lines changed

Envelopes.algo

20.2 KB
Binary file not shown.

Envelopes/Envelopes.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ namespace cAlgo
99
public class Envelopes : Indicator
1010
{
1111

12+
[Parameter()]
13+
public DataSeries Source { get; set; }
1214

1315
[Parameter(DefaultValue = 14)]
1416
public int Period { get; set; }
@@ -33,7 +35,7 @@ public class Envelopes : Indicator
3335
protected override void Initialize()
3436
{
3537

36-
_movingAverage = Indicators.MovingAverage(Bars.ClosePrices, Period, MAType);
38+
_movingAverage = Indicators.MovingAverage(Source, Period, MAType);
3739

3840
}
3941

Envelopes/Envelopes.csproj

Lines changed: 7 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,25 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
2+
<Project Sdk="Microsoft.NET.Sdk">
3+
<PropertyGroup>
4+
<TargetFramework>net6.0</TargetFramework>
5+
<EnableDefaultItems>False</EnableDefaultItems>
6+
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
7+
</PropertyGroup>
48
<PropertyGroup>
59
<LangVersion>7.2</LangVersion>
610
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
711
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
8-
<ProjectGuid>{554C1FED-8D47-4827-9E47-D10282CFDB3B}</ProjectGuid>
9-
<ProjectTypeGuids>{DD87C1B2-3799-4CA2-93B6-5288EE928820};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
10-
<OutputType>Library</OutputType>
1112
<AppDesignerFolder>Properties</AppDesignerFolder>
1213
<RootNamespace>cAlgo</RootNamespace>
1314
<AssemblyName>Envelopes</AssemblyName>
14-
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
15-
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
1615
<FileAlignment>512</FileAlignment>
1716
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
1817
</PropertyGroup>
19-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
20-
<DebugSymbols>true</DebugSymbols>
21-
<DebugType>full</DebugType>
22-
<Optimize>false</Optimize>
23-
<OutputPath>bin\Debug\</OutputPath>
24-
<DefineConstants>DEBUG;TRACE</DefineConstants>
25-
<ErrorReport>prompt</ErrorReport>
26-
<WarningLevel>4</WarningLevel>
27-
<WarningsAsErrors>CS0108,CS0162,CS0109,CS0219,CS0169,CS0628</WarningsAsErrors>
28-
</PropertyGroup>
29-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
30-
<DebugType>pdbonly</DebugType>
31-
<Optimize>true</Optimize>
32-
<OutputPath>bin\Release\</OutputPath>
33-
<DefineConstants>TRACE</DefineConstants>
34-
<ErrorReport>prompt</ErrorReport>
35-
<WarningLevel>4</WarningLevel>
36-
<WarningsAsErrors>CS0108,CS0162,CS0109,CS0219,CS0169,CS0628</WarningsAsErrors>
37-
</PropertyGroup>
3818
<ItemGroup>
39-
<Reference Include="System" />
40-
<Reference Include="System.Core" />
41-
<Reference Include="System.Xml.Linq" />
42-
<Reference Include="System.Data.DataSetExtensions" />
43-
<Reference Include="System.Data" />
44-
<Reference Include="System.Xml" />
45-
<Reference Include="cAlgo.API, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3499da3018340880, processorArchitecture=MSIL">
46-
<SpecificVersion>False</SpecificVersion>
47-
<HintPath>..\..\..\..\API\cAlgo.API.dll</HintPath>
48-
</Reference>
19+
<PackageReference Include="cTrader.Automate" Version="1.*" />
4920
</ItemGroup>
5021
<ItemGroup>
5122
<Compile Include="Envelopes.cs" />
5223
<Compile Include="Properties\AssemblyInfo.cs" />
5324
</ItemGroup>
54-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
55-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
56-
Other similar extension points exist, see Microsoft.Common.targets.
57-
<Target Name="BeforeBuild">
58-
</Target>
59-
<Target Name="AfterBuild">
60-
</Target>
61-
-->
6225
</Project>

Envelopes/Envelopes.csproj.backup

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<LangVersion>7.2</LangVersion>
6+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
7+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
8+
<ProjectGuid>{554C1FED-8D47-4827-9E47-D10282CFDB3B}</ProjectGuid>
9+
<ProjectTypeGuids>{DD87C1B2-3799-4CA2-93B6-5288EE928820};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
10+
<OutputType>Library</OutputType>
11+
<AppDesignerFolder>Properties</AppDesignerFolder>
12+
<RootNamespace>cAlgo</RootNamespace>
13+
<AssemblyName>Envelopes</AssemblyName>
14+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
15+
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
16+
<FileAlignment>512</FileAlignment>
17+
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
18+
</PropertyGroup>
19+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
20+
<DebugSymbols>true</DebugSymbols>
21+
<DebugType>full</DebugType>
22+
<Optimize>false</Optimize>
23+
<OutputPath>bin\Debug\</OutputPath>
24+
<DefineConstants>DEBUG;TRACE</DefineConstants>
25+
<ErrorReport>prompt</ErrorReport>
26+
<WarningLevel>4</WarningLevel>
27+
<WarningsAsErrors>CS0108,CS0162,CS0109,CS0219,CS0169,CS0628</WarningsAsErrors>
28+
</PropertyGroup>
29+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
30+
<DebugType>pdbonly</DebugType>
31+
<Optimize>true</Optimize>
32+
<OutputPath>bin\Release\</OutputPath>
33+
<DefineConstants>TRACE</DefineConstants>
34+
<ErrorReport>prompt</ErrorReport>
35+
<WarningLevel>4</WarningLevel>
36+
<WarningsAsErrors>CS0108,CS0162,CS0109,CS0219,CS0169,CS0628</WarningsAsErrors>
37+
</PropertyGroup>
38+
<ItemGroup>
39+
<Reference Include="System" />
40+
<Reference Include="System.Core" />
41+
<Reference Include="System.Xml.Linq" />
42+
<Reference Include="System.Data.DataSetExtensions" />
43+
<Reference Include="System.Data" />
44+
<Reference Include="System.Xml" />
45+
<Reference Include="cAlgo.API, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3499da3018340880, processorArchitecture=MSIL">
46+
<SpecificVersion>False</SpecificVersion>
47+
<HintPath>..\..\..\..\API\cAlgo.API.dll</HintPath>
48+
</Reference>
49+
</ItemGroup>
50+
<ItemGroup>
51+
<Compile Include="Envelopes.cs" />
52+
<Compile Include="Properties\AssemblyInfo.cs" />
53+
</ItemGroup>
54+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
55+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
56+
Other similar extension points exist, see Microsoft.Common.targets.
57+
<Target Name="BeforeBuild">
58+
</Target>
59+
<Target Name="AfterBuild">
60+
</Target>
61+
-->
62+
</Project>

0 commit comments

Comments
 (0)