Replies

fxkaiten
03 Jul 2014, 18:35

RE:

Ah yes, that totally clears it up.  Thanks very much.  I completely forgot that Ichimoku looks ahead.

Thanks again for the quick response and the code to fix it.

Best,

FXK

 

 


@fxkaiten

fxkaiten
02 Jul 2014, 18:21

RE:

Spotware said:

Regarding to our tests IchimokuKinkoHyo indicator provides correct values. Please post the code that you use to access indicator values. Probably you have a mistake in indices calculation.

Thanks for the reply.  To make it easy, I just used your example code and I am able to replicate the problem.

When I run this now 23:17 GMT+8 hours using a 15 minute chart, I get prints from the code:

Senkou B 101.597

Senkou A 101.667

When I look at the values on the screen with the indicator overlayed, I get:

Senkou B 101.558

Senkou A 101.534

Appreciate if you could help me see why I am getting different values.  I must be just overlooking something obvious.

Thanks,

FXK

 

 

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

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class NewIchimokuTest : Robot
    {


        private IchimokuKinkoHyo ichimokuKinkoHyo;

        protected override void OnStart()
        {

            ichimokuKinkoHyo = Indicators.IchimokuKinkoHyo(9, 26, 52);
        }

        protected override void OnTick()
        {

            Print("ChikouSpan Value = {0}", ichimokuKinkoHyo.ChikouSpan.LastValue);
            Print("KijunSen Value = {0}", ichimokuKinkoHyo.KijunSen.LastValue);
            Print("SenkouSpanA Value = {0}", ichimokuKinkoHyo.SenkouSpanA.LastValue);
            Print("SenkouSpanB Value = {0}", ichimokuKinkoHyo.SenkouSpanB.LastValue);
            Print("TenkanSen Value = {0}", ichimokuKinkoHyo.TenkanSen.LastValue);


        }

    }

}

 


@fxkaiten