Sample cBot Reference SMA
11 Nov 2015, 09:40
hi,
i try to add a simple sma to my bot. so i copy the example in my bot
[Parameter("Source")]
public DataSeries Source { get; set; }
[Parameter("SMA Period", DefaultValue = 14)]
public int SmaPeriod { get; set; }
private SampleSMA sma;
protected override void OnStart()
{
sma = Indicators.GetIndicator<SampleSMA>(Source, SmaPeriod);
}
Error CS0246: The type or namespace name 'SampleSMA' could not be found (are you missing a using directive or an assembly reference?)
i open a new bot, replace the code with the example i have the same error.
can someone explain why code from example is building and same code in new bot is not compiling?
thank you!

mindbreaker
11 Nov 2015, 10:27 ( Updated at: 21 Dec 2023, 09:20 )
RE:
Hi
If You use indicator in cbot need add reference.
Bye
@mindbreaker