Replies

hugo_carpegianny
06 Dec 2020, 05:59

IBOV brasil

Up para os brasileiros!


@hugo_carpegianny

hugo_carpegianny
01 Aug 2019, 16:01

RE:

Panagiotis Charalampous said:

Hi hugo_carpegianny,

Thanks for posting in our forum. You can consider contacting a Consultant or posting a Job.

Best Regards,

Panagiotis

Trank you very much

 


@hugo_carpegianny

hugo_carpegianny
30 Jul 2019, 16:11

RE:

Panagiotis Charalampous said:

Hi Hugo,

Change the line below

_ema = Indicators.ExponentialMovingAverage(MarketSeries.Close, 14);

to

_ema = Indicators.ExponentialMovingAverage(MarketSeries.Close, 3);

Best Regards,

Panagiotis

got it. thank you very much

 


@hugo_carpegianny

hugo_carpegianny
30 Jul 2019, 16:10

Panagiots

got it. thank you very much


@hugo_carpegianny

hugo_carpegianny
30 Jul 2019, 13:03

RE:

Panagiotis Charalampous said:

Hi Hugo,

See an example below

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

namespace cAlgo
{
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class NewIndicator : Indicator
    {
        [Parameter(DefaultValue = 1)]
        public int Offset { get; set; }

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

        ExponentialMovingAverage _ema;
        protected override void Initialize()
        {
            _ema = Indicators.ExponentialMovingAverage(MarketSeries.Close, 14);
        }

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

Best Regards,

Panagiotis

 

 

ow, thank you very much. It worked, but it has 14 periods. How do I put with 3 periods?

gratitude

 


@hugo_carpegianny