public class SidiSuperTrend : Indicator
{
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Calculate = Calculate.OnBarClose;
....
}
...
}
public class SidiUnmanaged : Strategy
{
private SidiSuperTrend sidiSuperTrend;
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Calculate = Calculate.OnEachTick;
....
}
else if (State == State.DataLoaded)
{
sidiSuperTrend = SidiSuperTrend(STMode, STPeriode, STMultiplier, STMaType, STSmooth, STShowArrows, STShowHollowUpBars, STColorBars, STBarColorUp, STBarColorDown, STPlayAlert, STLongAlert, STShortAlert);
if (ShowSupertrend)
{
AddChartIndicator(sidiSuperTrend);
}
}
...

Comment