Information

Username: danieljclsilva
Member since: 15 Mar 2019
Last login: 02 Jan 2024
Status: Active

Activity

Where Created Comments
Algorithms 4 3
Forum Topics 0 1
Jobs 0 0

Last Algorithm Comments

danieljclsilva's avatar
danieljclsilva · 3 years ago

Chart image: link

Do you know why is that?

danieljclsilva's avatar
danieljclsilva · 3 years ago

Version 2

protected override void Initialize()
        {
            mma = Indicators.MovingAverage(Bars.ClosePrices, mmaLength, maType);
            [...]

        }

None of them showed any difference.

danieljclsilva's avatar
danieljclsilva · 3 years ago

I made two versions of this indicator to see the difference the BARSCLOSE1000 indicator does by multiplying the closing price by 1000.

Version 1 (only modifications)

[...]

private IndicatorDataSeries source;

[...]

protected override void Initialize()
        {
            source = CreateDataSeries();
            mma = Indicators.MovingAverage(source, mmaLength, maType);
            smma = Indicators.MovingAverage(mma.Result, smmaLength, maType);

            [...]
        }

public override void Calculate(int index)
        {
            source[index] = Bars.ClosePrices[index] * 1000;