region variables
private Band targetlevelhigh = Band.TargetL30;
private Band targetlevellow = Band.TargetL10;
DataSeries TargHigh;
DataSeries TargLow;
TargHigh = new DataSeries(this);
TargLow = new DataSeries(this);
protected override void OnBarUpdate()
{
if (FirstTickOfBar)
{
switch (targetlevelhigh)
{
case Band.TargetL30:
{
TargHigh.Set(blah blah blah indicator);
break;
}
case Band.TargetL25:
{
TargHigh.Set(blah blah blah indicator);
break;
}
case Band.TargetL20:
{
TargHigh.Set(blah blah blah indicator);
break;
}
case Band.TargetL15:
{
TargHigh.Set(blah blah blah indicator);
break;
}
case Band.TargetL10:
{
TargHigh.Set(blah blah blah indicator);
break;
}
}
switch (targetlevellow)
{
case Band.TargetL30:
{
TargLow.Set(blah blah blah indicator);
break;
}
case Band.TargetL25:
{
TargLow.Set(blah blah blah indicator);
break;
}
case Band.TargetL20:
{
TargLow.Set(blah blah blah indicator);
break;
}
case Band.TargetL15:
{
TargLow.Set(blah blah blah indicator);
}
case Band.TargetL10:
{
TargLow.Set(blah blah blah indicator);
}
}
}
region Properties [Description("Maximum allowable position size")]
[GridCategory("Parameters")]
public Band TargetLevelHigh
{
get { return targetlevelhigh; }
set { targetlevelhigh = value; }
}
[Description("Maximum allowable position size")]
[GridCategory("Parameters")]
public Band TargetLevelLow
{
get { return targetlevellow; }
set { targetlevellow = value; }
}
#endregion
public enum Band : int
{
TargetL30 = -30,
TargetL25 = -25,
TargetL20 = -20,
TargetL15 = -15,
TargetL10 = -10,
}
Comment