Incorrect values for Ichimoku Span A and Span B
-
- Posts: 4
- Joined: Tue Aug 24, 2021 10:58 am
Incorrect values for Ichimoku Span A and Span B
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));
Who is online
Users browsing this forum: No registered users and 15 guests