Initial commit

This commit is contained in:
Michael Schimmel
2026-01-28 09:10:52 +01:00
commit a1d2e96f8a
513 changed files with 19503 additions and 0 deletions
@@ -0,0 +1,25 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31729.503
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample Reference SMA", "Sample Reference SMA\Sample Reference SMA.csproj", "{379F2DE2-039B-418A-96D2-D12A54957B53}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{379F2DE2-039B-418A-96D2-D12A54957B53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{379F2DE2-039B-418A-96D2-D12A54957B53}.Debug|Any CPU.Build.0 = Debug|Any CPU
{379F2DE2-039B-418A-96D2-D12A54957B53}.Release|Any CPU.ActiveCfg = Release|Any CPU
{379F2DE2-039B-418A-96D2-D12A54957B53}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E36CB531-4E18-4E12-9076-292B58A6D9E9}
EndGlobalSection
EndGlobal
@@ -0,0 +1,38 @@
// -------------------------------------------------------------------------------------------------
//
// This code is a cTrader Automate API example.
//
// All changes to this file might be lost on the next application update.
// If you are going to modify this file please make a copy using the "Duplicate" command.
//
// -------------------------------------------------------------------------------------------------
using cAlgo.API;
namespace cAlgo
{
[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AutoRescale = false, AccessRights = AccessRights.None)]
public class SampleReferenceSMA : Indicator
{
[Parameter("Source")]
public DataSeries Source { get; set; }
[Parameter(DefaultValue = 14)]
public int SmaPeriod { get; set; }
[Output("Referenced SMA Output")]
public IndicatorDataSeries refSMA { get; set; }
private SampleSMA sma;
protected override void Initialize()
{
sma = Indicators.GetIndicator<SampleSMA>(Source, SmaPeriod);
}
public override void Calculate(int index)
{
refSMA[index] = sma.Result[index];
}
}
}
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="cTrader.Automate" Version="1.*-*" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Sample SMA\Sample SMA\Sample SMA.csproj" />
</ItemGroup>
</Project>