main window

Created at 21 Dec 2017, 16:55
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!
RE

rewtrading

Joined 21.12.2017

main window
21 Dec 2017, 16:55


I have converted a mql file to calgo. The build has no errors, when I run the indicator in is not on main chart window. What code do I need to make sure it is on main chart window


@rewtrading
Replies

PanagiotisCharalampous
21 Dec 2017, 17:33

Hi rewtrading,

Could you share the code with us to advise you what could be wrong?

Best Regards,

Panagiotis


@PanagiotisCharalampous

rewtrading
22 Dec 2017, 00:37

RE:

rewtrading said:

I have converted a mql file to calgo. The build has no errors, when I run the indicator in is not on main chart window. What code do I need to make sure it is on main chart window

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

namespace cAlgo
{
    [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class supersignal : Indicator
    {
        [Parameter(DefaultValue = 0.0)]
        public double Parameter { get; set; }

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


        protected override void Initialize()
        {
            // Initialize and create nested indicators
        }

        public override void Calculate(int index)
        {
            // Calculate value at specified index
            // Result[index] = ...
        }
    }
}

 


@rewtrading

PanagiotisCharalampous
22 Dec 2017, 09:48

Hi rewtrading,

Thanks for posting the code. However this indicator does not seem to do anything. It is an empty indicator. How did you perform the conversion? If you want to learn more on how to develop indicators you can read the guide here.

Best Regards,

Panagiotis


@PanagiotisCharalampous

rewtrading
22 Dec 2017, 12:16

I used an online converter.

Thank you for your help

 


@rewtrading