Nested Ichimoku indicator broken in 3.7 beta

Created at 20 Dec 2019, 11: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!
MP

mpistorius

Joined 27.05.2019

Nested Ichimoku indicator broken in 3.7 beta
20 Dec 2019, 11:25


Running cTrader 3.7 public beta, I'm unable to use the built-in Ichimoku indicator in another bot or custom indicator.  Initialization fails with error:
 
Crashed in Initialize with ArgumentException: Incorrect parameters count. Parameter name: parameterValues

Both versions in the API to create the Ichi indicator fails:

ichi = Indicators.IchimokuKinkoHyo( 9, 21, 52 );
ichi = Indicators.IchimokuKinkoHyo( Bars, 9, 21, 52 );


Here is a minimal sample that fails.  The same code works fine in cTrader 3.6

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 TestMA : Indicator
    {
  
        [Output("Baseline", LineColor = "Aqua")]
        public IndicatorDataSeries Result { get; set; }

        // Indicators
        private IchimokuKinkoHyo ichi;
        private IndicatorDataSeries indiSeries;

        protected override void Initialize()
        {
            ichi = Indicators.IchimokuKinkoHyo( 9, 21, 52 );
            indiSeries = ichi.KijunSen;
        }

        public override void Calculate(int index)
        {
            Result[ index ] = indiSeries != null ? indiSeries[ index ] : Double.NaN;
        }
    }
}

 

 


@mpistorius
Replies

PanagiotisCharalampous
20 Dec 2019, 11:37

Hi mpistorius,

Thanks for reporting this issue. It is a known issue with Spotware cTrader Beta 3.7 and it will be resolved in an upcoming update.

Best Regards,

Panagiotis 

Join us on Telegram

 

 


@PanagiotisCharalampous