我本身沒有接觸過任何程式語言, 但工作上需要這些技能, 如果由0開始自學,
直到能普通運用C# , 要經過那些必修的階段 ? 如果一天能花8小時自學 要學多久?
我的工作應用 大慨如下 :
region Using declarations
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Xml.Serialization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Indicator;
using NinjaTrader.Gui.Chart;
using NinjaTrader.Strategy;
#endregion
// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
/// <summary>
/// Enter the description of your strategy here
/// </summary>
[Description("Enter the description of your strategy here")]
public class SlowStochasticSignal1 : Strategy
{
#region Variables
// Wizard generated variables
private int slowK = 13;
private int slowD = 9;
private int smoothD = 6;
// User defined variables (add any user defined variables below)
#endregion
/// <summary>
/// This method is used to configure the strategy and is called once before any strategy method is called.
/// </summary>
protected override void Initialize()
{
//Stochastics(smoothD, slowK, slowD).Plot[0].Pen.Color = Color.Beige;
Add(Stochastics(6,13,9));
Add(SMA(13));
CalculateOnBarClose = true;
SetProfitTarget(CalculationMode.Ticks,30);
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
if (1 == 2) ;
{
EnterShort(1,"short");
}
}
#region Properties
public int Slowk
{
get { return slowK; }
set { slowK = Math.Max(1, value); }
}
public int SlowD
{
get { return slowD; }
set { slowD = Math.Max(1, value); }
}
public int SmoothD
{
get { return smoothD; }
set { smoothD = Math.Max(1, value); }
}
#endregion
}
}