Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ichikomu Custom Offset Parameters #558

Closed
moslem7026 opened this issue Sep 11, 2021 · 9 comments
Closed

Ichikomu Custom Offset Parameters #558

moslem7026 opened this issue Sep 11, 2021 · 9 comments
Labels
enhancement New feature or request

Comments

@moslem7026
Copy link

moslem7026 commented Sep 11, 2021

ichikomu have Default Paramater named Displacement or Offset that is 26 . how can i set to 0 in skender library ?

@moslem7026 moslem7026 added the enhancement New feature or request label Sep 11, 2021
@DaveSkender
Copy link
Owner

There are a few offsets in Ichimoku. I don’t use the term Displacement, do you have a reference where I can see it?

@moslem7026
Copy link
Author

in trading View Ichikomu indicator have this input

@DaveSkender
Copy link
Owner

Do you have a URL to something that describes the TradingView parameters?

I’ve used an implementation more like what you see here:
https://school.stockcharts.com/doku.php?id=technical_indicators:ichimoku_cloud

@DaveSkender
Copy link
Owner

I’m open to upgrading this to add more parameters that might allow this extra customization that I think is what you’re seeking, but need to know more about it.

@DaveSkender
Copy link
Owner

DaveSkender commented Sep 11, 2021

I see this in Trading View. I suspect this Displacement value is just a custom offset amount for Senkou Spans and Chikou Span (lagging span).

image

One thing I do notice here is that Trading View does not allow a 0 value for Displacement. If my interpretation is correct, you'd basically not have an Ichimoku cloud if you did that anyway, so it doesn't seem to make much sense. Can you elaborate on how a displacement offset of 0 would be used, practically?

@DaveSkender DaveSkender changed the title Ichikomu Displacement Parameter Ichikomu Custom Offset Parameters Sep 11, 2021
@DaveSkender
Copy link
Owner

DaveSkender commented Sep 11, 2021

To expand this indicator to allow custom offset periods for Senkou and Chikou spans, I think I'll implement these overload methods:

// defaults
.GetIchimoku()

// standard offsets
.GetIchimoku(signalPeriods,shortSpanPeriods,longSpanPeriods)

// custom offset
.GetIchimoku(signalPeriods,shortSpanPeriods,longSpanPeriods,offsetPeriods)

// custom and different offsets
.GetIchimoku(signalPeriods,shortSpanPeriods,longSpanPeriods,senkouOffset,chikouOffset)

The default and standard variants currently exist in the library, so I'll only be adding the last two.

While I'm updating this one, I think I'll also rename the original 3 parameters:

  • tenkanPeriods
  • kijunPeriods
  • senkouBPeriods

@DaveSkender DaveSkender mentioned this issue Sep 12, 2021
12 tasks
@DaveSkender
Copy link
Owner

In my implementation, you'll be able to use whichever you prefer, 3/4/5 parameter variants. I've also set it up so you can use an offset of 0, despite me not knowing why someone would do that -- no harm in allowing it if it doesn't break the calculation (and it does not).

@DaveSkender
Copy link
Owner

This was release in version 1.17.1

@github-actions
Copy link

This Issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new Issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants