Incorrect values for Ichimoku Span A and Span B

Bug reports and errors in the program
Message
Author
mrgroove
Posts: 4
Joined: Tue Aug 24, 2021 10:58 am

Incorrect values for Ichimoku Span A and Span B

#1 Postby mrgroove » Mon Nov 29, 2021 4:08 pm

ichimoku.png
ichimoku.png (527.59 KiB) Viewed 3029 times
Hi,

Noticing that the values for the SPAN A and SPAN B of the ichimoku indicator are incorrect and far off (strangely, the Tenkan Sen and Kinjun Sen values are correct.) I have pasted some of my code and screenshot:

---------------- code snippet ----------------
TenkanSenPeriod: integer = 9;
KijunSenPeriod: integer = 26;
SenkouSpanPeriod: integer = 52;

RegOption('Timeframe',ot_Timeframe,timeFrame);
timeFrame := PERIOD_H1;


EAIchimoku := CreateIndicator(Currency,timeframe,'Ichimoku',Format('%d;%d;%d',[TenkanSenPeriod,KijunSenPeriod,SenkouSpanPeriod]));

vTenKanSen := GetIndicatorValue(EAIchimoku,0,0);
Print('Ichimoku Tenkansen is: '+FloatToStr(vTenKanSen));
vKijunSen := GetIndicatorValue(EAIchimoku,0,1);
Print('Ichimoku KijunSen is: '+FloatToStr(vKijunSen));
vSenkouSpanA := GetIndicatorValue(EAIchimoku,0,3);
Print('Ichimoku Span A is: '+FloatToStr(vSenkouSpanA));
vSenkouSpanB := GetIndicatorValue(EAIchimoku,0,4);
Print('Ichimoku Span B is: '+FloatToStr(vSenkouSpanB));
vChikouSpan := GetIndicatorValue(EAIchimoku,0,2);
Print('Ichimoku Chikou Span is: '+FloatToStr(vChikouSpan));


ichimoku.png
ichimoku.png (527.59 KiB) Viewed 3029 times

Return to “Bug reports”

Who is online

Users browsing this forum: No registered users and 14 guests