Moving Average for Specified Pair
01 Apr 2015, 22:18
This cBot code returns moving moving average information based on the chart the bot is attached to. How can I get it to return moving average information for the pair "USDCHF" regardless of what chart the bot is attached to?
using System;
using cAlgo.API;
using cAlgo.API.Indicators;
namespace cAlgo
{
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class SampleTrendcBot : Robot
{
protected override void OnTick()
{
MovingAverage ma = Indicators.MovingAverage(MarketSeries.Close, 8, MovingAverageType.WilderSmoothing);
Print(ma.Result.Last(0));
}
}
}

Spotware
06 Apr 2015, 12:38
Please see /forum/cbot-support/4746
@Spotware