rd13 / ichimoku

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

REQUEST !!!! Can you please add laggingspan ?

droidmanspace opened this issue · comments

Hi,
Lagging span values are not available in this code. Can you add that to fulfill the Ichimoku Cloud?

+1
It will be great for your project to add the lagginspan information.

Should the lagging span not just be the current price moved a period behind? E.g. 26 periods behind?

@wisaninona Yes, it is the closing price moved to a period behind

I'll do this at some point if I figure out the right approach. I can't do it in the current generator function as this calculates up until the current candle based on the previous x number of periods. The only way I can see to do this is pass the candle used for the lagging span in the nextValue params, something like:

for( let [index, candle] of candles ) {
	let ichimokuValue = ichimoku.nextValue({
		high  : candle.high,
		low   : candle.low,
		close : candle.close,
		laggingSpan : candles[index+26].close
	})
}

Please can somebody explain me result of TA ichi? If i get it right, it is like this:
conversion, base - are in actual time [ T ].
spanA, spanB - are in future time [ T + 26 ].
laggingSpan - is missing, but is price in history [ T - 26 ].
Do i get it right?

Has anyone successfully been able to get lagging span in there?

The lagging span is the current closing price.

In order to see if it is above the lagging price action, just compare the current closing price with the highest price of the 26th last candle.