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

add S3+R3 to Standard Pivot Points #671

Merged
merged 4 commits into from
Dec 24, 2021

Conversation

myalgomate
Copy link
Contributor

@myalgomate myalgomate commented Dec 22, 2021

Description

Adds S3+R3 to Standard Pivot Points
See #668

Checklist

  • My code follows the existing style, code structure, and naming taxonomy
  • I have commented my code, particularly in hard-to-understand areas
  • I have performed a self-review of my own code and included any verifying manual calculations
  • I have added or updated unit tests that prove my fix is effective or that my feature works, and achieves sufficient code coverage. New and existing unit tests pass locally and in the build (below) with my changes
  • My changes generate no new warnings and running code analysis does not produce any issues
  • I have added or run the performance tests that depict optimal execution times
  • I have made corresponding changes to the documentation

@DaveSkender
Copy link
Owner

DaveSkender commented Dec 22, 2021

This is the one to leave open, you should close the other one. You can continue to add commits to your forked branch and they’ll be reflected here.

@DaveSkender DaveSkender reopened this Dec 22, 2021
@DaveSkender DaveSkender changed the title Myalgomate Pivot Point Add new Type add S3+R3 to Standard Pivot Points Dec 23, 2021
@DaveSkender
Copy link
Owner

I'm going to update S3 and R3 according to Wikipedia:

R3 = H + 2×(P − L) = R1 + (HL)
S3 = L − 2×(H − P) = S1 − (HL)

@DaveSkender
Copy link
Owner

@myalgomate do a review on this change; then I'll merge it.

@myalgomate
Copy link
Contributor Author

myalgomate commented Dec 24, 2021

Hi Dave,
The value gets differ for S3 and R3.

Better if we separate the new type with the name ChartIQ and follow the below calculations.
ChartIQ is an charting engine and its calculation is as below :

Pivot Points formula are calculated as follows on Kite for ChartIQ:

KITE(ChartIQ)

Pivot point = (H + L + C) / 3
First support level (S1) = (2 * P) – H
Second support level (S2) = P – (H – L)
Third support level (S3) = P – 2*(H-L)
First resistance level (R1) = (2 * P) – L
Second resistance level (R2) = P + (H – L)
Third resistance level (R3) = P + 2*(H – L)

To put this into an example.

Assume XYZ’s stock has it’s High(H) - 129.7, Low(L) - 126.9 and Close(C) - 127.35 respectively. So the pivot points in Kite would be calculated as follows : 

KITE(ChartIQ)  
Pivot point = (H + L + C) / 3 127.98
First support level (S1) = (2 * P) – H 126.27
Second support level (S2) = P – (H – L) 125.18
Third support level (S3) = P – 2*(H-L) 122.38
First resistance level (R1) = (2 * P) – L 129.07
Second resistance level (R2) = P + (H – L) 130.78
Third resistance level (R3) = P + 2*(H – L) 133.58


Please check this post on TradingQ&A for a detailed explanation.

@myalgomate
Copy link
Contributor Author

you can push that changes in standard as Wikipedia and also add the ChartIQ type of Pivot

@DaveSkender DaveSkender merged commit a600e75 into DaveSkender:main Dec 24, 2021
@DaveSkender
Copy link
Owner

DaveSkender commented Dec 24, 2021

Yah, these appear to be an entirely different flavor, but do like the reputation and authenticity of the references in Wikipedia for extending Standard.

That blog sorta shows that there’s a lot of confusion around those other custom types. I’m sure there are quite a few variants out there we’ve not covered, but I do want to only include ones from reputable authors.

@myalgomate
Copy link
Contributor Author

Yeah, i understand the thing u suggested to rely on a reputed reference.
In India, all the brokers are integrated with the ChartIQ Charting Engine only.

If possible please add it to the separate type so to avoid our standard Pivot confusion as well.

Atleast this will help all the ChartIQ platform users.

@DaveSkender
Copy link
Owner

Yes, best to keep separate. To consider ChartIQ though, I’d like to first find out if their formula has a reputable author or if they simple wrote some random equations that looked nice. It is possible, and I’ve seen this in other popular charting platforms, that they simply made a horrible mistake! 😄

@github-actions
Copy link

github-actions bot commented Feb 5, 2022

This Pull Request 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 Feb 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants