Combine an Indicator with Cbot

Created at 28 Aug 2017, 12:40
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
TR

trvago

Joined 28.08.2017

Combine an Indicator with Cbot
28 Aug 2017, 12:40


Hi Traders & Coders,

I am wondering how can i combine an Indicator with Cbot?

Thanks


@trvago
Replies

Spotware
28 Aug 2017, 12:54

Dear trvago,

You can use indicators in a cBot by calling the different built-in indicators included in the Indicators namespace. See an example calling the Simple Moving Average indicator below

var sma = Indicators.SimpleMovingAverage(MarketSeries.Median,14);
var smaLastValue = sma.Result.LastValue;

You can also access custom indicators by following the steps described here.

Best Regards,

cTrader Team


@Spotware