Difference in Tick Volume between cAlgo and cTrader

Created at 21 Oct 2014, 19:44
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!
CR

CristianL

Joined 26.08.2014

Difference in Tick Volume between cAlgo and cTrader
21 Oct 2014, 19:44


Hello,

I used the code attached below just to count the tick volume and I noticed that cAlgo only counts the changes in the price on the Bid Price. It should count Bid and Ask price changes. I like to know if this issue regards the platform or the broker (Im currently using the broker FxPro).

Thank you.

using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class TickCount : Robot
    {
        protected int c = 0;

        protected override void OnBar()
        {
            Print("OpenTime= " + MarketSeries.OpenTime[MarketSeries.OpenTime.Count - 2] + " TickVolume= " + c);
            c = 0;
        }

        protected override void OnTick()
        {
            c++;
        }
    }
}

 


@CristianL
Replies

Spotware
22 Oct 2014, 09:14

TickVolume is calculated based on bid changes only. It doesn't depend on Broker. We will consider changing this functionality.


@Spotware