Skip to content

Instantly share code, notes, and snippets.

@osya
Last active November 26, 2015 07:27
Show Gist options
  • Save osya/725fbde5e12d104a3858 to your computer and use it in GitHub Desktop.
Save osya/725fbde5e12d104a3858 to your computer and use it in GitHub Desktop.
Описание параметров оптимизации стратегии Wealth-Lab в коде #WLD #CSharp
using System;
using System.Collections.Generic;
using System.Text;
using WealthLab;
using WealthLab.Indicators;
using System.Drawing;
namespace WealthLabCompile
{
class MovingAverageCrossover : WealthScript
{
StrategyParameter slowPeriod; //Объявляем параметр.
public MovingAverageCrossover() //Создаём конструктор для инициализации параметров
{
slowPeriod= CreateParameter("Slow Period", 20, 1, 100, 1); //Инициализируем параметр.
}
protected override void Execute()
{
int slowPer = slowPeriod.ValueInt; //Получаем значение параметра
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment