Tucsky / aggr

Cryptocurrency trades aggregator
https://charts.aggr.trade/
GNU General Public License v3.0
836 stars 241 forks source link

Missing lines for ichimoku #233

Open ph4z opened 2 years ago

ph4z commented 2 years ago

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

Tucsky commented 2 years ago

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

ph4z commented 2 years ago

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

okutrades commented 1 year ago

@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)
adeacetis commented 1 year ago

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?