Print to Log is not working

Created at 06 Jul 2017, 23:25
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!
ccsalway@icloud.com's avatar

ccsalway@icloud.com

Joined 06.07.2017

Print to Log is not working
06 Jul 2017, 23:25


I have the following code running in cAlgo but run I add the indicator to a chart, nothing is displayed in the Log at the bottom. Does anyone know why?

 

using System;
using cAlgo.API;
using cAlgo.API.Internals;

namespace cAlgo
{
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class PivotPoints : Indicator
    {
        //private DateTime dtStart;

        [Parameter(DefaultValue = "Classic")]
        public string Name { get; set; }

        [Output("Main")]
        public IndicatorDataSeries Result { get; set; }

        protected override void Initialize()
        {
            // Initialize and create nested indicators
            Print("hello");
        }

        public override void Calculate(int index)
        {
            // Calculate value at specified index
            //Result[index] = MarketSeries.High[index] - MarketSeries.Low[index];

            Print(index);
        }
    }
}

 


@ccsalway@icloud.com
Replies

ccsalway@icloud.com
07 Jul 2017, 10:20

Worked it out.  I was simply attaching an instance to a cBot instead of an Instance.


@ccsalway@icloud.com

Xammo
09 Jul 2021, 07:54 ( Updated at: 21 Dec 2023, 09:22 )

...to an Indicator


@Xammo