Information

Username: didpenny
Member since: 26 Apr 2017
Last login: 26 Apr 2017
Status: Active

Activity

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

Last Algorithm Comments

DI
didpenny · 6 years ago

Hi tmc,

Great job.

Quick question for you, I am trying to calculate a moving average based on your renko chart. Sounds simple but it does not seem to work (nothing appears on the chart), even if this compiles - do you see anything wrong in this section of my code:

 private Renko renko;
 private IndicatorDataSeries renko_data;
 private MovingAverage renko_MA;

 protected override void Initialize()
        {

            renko = Indicators.GetIndicator(RenkoPips, BricksToShow, 3, "SeaGreen", "Tomato");
            renko_data = CreateDataSeries();
            renko_MA = Indicators.MovingAverage(renko_data, 10, MovingAverageType.Simple);

        }

        public override void Calculate(int index)
        {

            renko_data[index] = renko.Close[index];

            Indic[index] = renko_MA.Result[index];

        }