aggr icon indicating copy to clipboard operation
aggr copied to clipboard

Missing lines for ichimoku

Open ph4z opened this issue 3 years ago • 4 comments

Actually ichimoku only display the kumo. It would be great to add the 3 missing lines of the system:

  • Tenkan
  • Kijun
  • Laggin span

ph4z avatar Aug 01 '22 21:08 ph4z

I you have an updated version of the ichimoku indi and you willing to share I can update the default one !

Tucsky avatar Aug 10 '22 10:08 Tucsky

I would be glad to contribute, but I don't really understand this scripting language yet.

ph4z avatar Aug 10 '22 12:08 ph4z

@Tucsky this should work

conversionLine = (lowest($price.low, options.conversionLineLength) + highest($price.high, options.conversionLineLength)) / 2

baseLine = (lowest($price.low, options.baseLineLength) + highest($price.high, options.baseLineLength)) / 2

leadLineOne = (conversionLine + baseLine) / 2

leadLineTwo = (lowest($price.low, options.laggingSpanTwoLength) + highest($price.high, options.laggingSpanTwoLength)) / 2

plotcloudarea(leadLineTwo, leadLineOne, offset=options.displacement)

plotline(conversionLine, color = blue)
plotline(baseLine, color = red)
plotline($price.close, color = white, offset = -26)

okutrades avatar Oct 02 '22 06:10 okutrades

Hello all,

Thank you @okutrades for the script. I have combined your work with the default indicator, and I completed based on the formulas found on this site: https://www.investopedia.com/terms/i/ichimoku-cloud.asp

Here's the comparison with TradingView's built-in Ichimoku. Pair is KRAKEN:BTC/USD on TV or KRAKEN:XBT/USD on Aggr. Note the discrepancy in the name. I had some issues to find in the connection panel because (Some exchanges use XBT instead of BTC which makes it harder to find sometimes.) I will add this to a new enhancement proposal.

image

The file: indicator_ichimoku.txt

Can you update the default indicator on prod @Tucsky?

adeacetis avatar Jun 12 '23 00:06 adeacetis