Class Cross
java.lang.Object
io.runon.trading.technical.analysis.indicators.Cross
골든 크로스 데드 크로스 잡기
- Author:
- macle
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CrossgetCross(BigDecimal[] shotArray, BigDecimal[] longArray, BigDecimal disparity) static CrossgetCross(BigDecimal[] shotArray, BigDecimal[] longArray, BigDecimal disparity, int minCount) 크로스 지점 얻기 short 5 이면 long 은 10 15 20 등. 5일 이평선과 20일 이평선의 경우를 생각하면 됨 두 배열의 크기는 반드시 일치 할것이격도intgetIndex()실제 크로스가 발생한 위치 (겹친위치) 이격도가 넘어선 시점이 유효하기 때문에 실위치랑 다르다getType()크로스 유형얻기static booleanisBetween(BigDecimal[] shotArray, BigDecimal[] longArray, int start, int end, BigDecimal disparity, boolean isLong) 사이에 다른 유효한 지점이 없었는지 여부
-
Field Details
-
MIN_COUNT
public static final int MIN_COUNT- See Also:
-
NONE
-
-
Constructor Details
-
Cross
public Cross()
-
-
Method Details
-
getType
크로스 유형얻기- Returns:
- 골드크로스 or 데드 크로스
-
getIndex
public int getIndex()실제 크로스가 발생한 위치 (겹친위치) 이격도가 넘어선 시점이 유효하기 때문에 실위치랑 다르다- Returns:
- 실제 크로스가 발생한 위치
-
getDisparity
이격도- Returns:
- 이격도
-
getCross
-
getCross
public static Cross getCross(BigDecimal[] shotArray, BigDecimal[] longArray, BigDecimal disparity, int minCount) 크로스 지점 얻기 short 5 이면 long 은 10 15 20 등. 5일 이평선과 20일 이평선의 경우를 생각하면 됨 두 배열의 크기는 반드시 일치 할것- Parameters:
shotArray- 짧은 배열longArray- 긴배열disparity- 돌파를 확인하는 이격도 겹치는 지점에서 이격도이상에서 보이는자리에서 한다. short/long *100 골든크로스를 얻으려면 100보다 큰값, 데드크로스를 얻으로면 100보다 작은값minCount- 크로스 발생이 유효하다고 판단되는 이전 캔들의 건수- Returns:
- 크로스 발생 유형과 위치
-
isBetween
public static boolean isBetween(BigDecimal[] shotArray, BigDecimal[] longArray, int start, int end, BigDecimal disparity, boolean isLong) 사이에 다른 유효한 지점이 없었는지 여부
-