Permalink
Browse files

initial push

  • Loading branch information...
1 parent 335a089 commit c8bf0c5d410c53d24e254e4eda0e7e057a84a746 Paul Russo committed Oct 14, 2016
Showing with 30,506 additions and 1 deletion.
  1. +7 −0 .gitignore
  2. +241 −0 LICENSE.md
  3. +23 −1 README.md
  4. +31 −0 build.gradle
  5. BIN gradle/wrapper/gradle-wrapper.jar
  6. +6 −0 gradle/wrapper/gradle-wrapper.properties
  7. +164 −0 gradlew
  8. +90 −0 gradlew.bat
  9. BIN src/jchart/jc.jpg
  10. BIN src/jchart/jc.png
  11. +12 −0 src/jchart/tickers/_index.tic
  12. +4,923 −0 src/jchart/tickers/all.tic
  13. +551 −0 src/jchart/tickers/etf.tic
  14. +742 −0 src/jchart/tickers/financials.tic
  15. +40 −0 src/jchart/tickers/futures.tic
  16. +1 −0 src/jchart/tickers/jchart.id
  17. +5 −0 src/jchart/tickers/mylist.tic
  18. +36 −0 src/jchart/tickers/postech.tic
  19. +1,500 −0 src/jchart/tickers/sp1500.tic
  20. +500 −0 src/jchart/tickers/sp500.tic
  21. +113 −0 src/jchart/tickers/startup.tic
  22. +5,983 −0 src/jchart/tickers/tickergroup.csv
  23. +94 −0 src/main/java/com/jchart/Jchart.java
  24. +14 −0 src/main/java/com/jchart/JchartFrameDestroyer.java
  25. +94 −0 src/main/java/com/jchart/JchartInitializer.java
  26. +19 −0 src/main/java/com/jchart/JchartIntr.java
  27. +52 −0 src/main/java/com/jchart/adapter/QuoteAdapter.java
  28. +96 −0 src/main/java/com/jchart/adapter/QuoteDataBean.java
  29. +13 −0 src/main/java/com/jchart/adapter/android/Orientation.java
  30. +15 −0 src/main/java/com/jchart/applet/AppletParamAccessor.java
  31. +226 −0 src/main/java/com/jchart/applet/JchartApplet.java
  32. +157 −0 src/main/java/com/jchart/applet/JchartComponent.java
  33. +241 −0 src/main/java/com/jchart/io/IoJchartBase.java
  34. +5 −0 src/main/java/com/jchart/io/TickerListener.java
  35. +96 −0 src/main/java/com/jchart/io/TickerRequest.java
  36. +48 −0 src/main/java/com/jchart/io/factory/IoFactory.java
  37. +24 −0 src/main/java/com/jchart/io/factory/IoFactoryIntr.java
  38. +193 −0 src/main/java/com/jchart/io/factory/impl/IoFutures.java
  39. +157 −0 src/main/java/com/jchart/io/factory/impl/IoGoogleImpl.java
  40. +359 −0 src/main/java/com/jchart/io/factory/impl/IoJchartPsr.java
  41. +23 −0 src/main/java/com/jchart/io/factory/impl/IoJchartScreenWeb.java
  42. +31 −0 src/main/java/com/jchart/io/factory/impl/TickerConame.java
  43. +34 −0 src/main/java/com/jchart/livequote/LiveQuote.java
  44. +8 −0 src/main/java/com/jchart/livequote/LiveQuoteRequest.java
  45. +11 −0 src/main/java/com/jchart/livequote/LiveQuoteRequestFactory.java
  46. +41 −0 src/main/java/com/jchart/livequote/goog/GoogLiveQuoteRequest.java
  47. +67 −0 src/main/java/com/jchart/livequote/goog/GoogLiveQuoteSaxHandler.java
  48. +60 −0 src/main/java/com/jchart/livequote/yhoo/YhooLiveQuoteRequest.java
  49. +5 −0 src/main/java/com/jchart/model/ChangeRequest.java
  50. +264 −0 src/main/java/com/jchart/model/ChartOption.java
  51. +50 −0 src/main/java/com/jchart/model/ChartSizeModel.java
  52. +431 −0 src/main/java/com/jchart/model/ChartTypeModel.java
  53. +37 −0 src/main/java/com/jchart/model/ConameFactory.java
  54. +6 −0 src/main/java/com/jchart/model/Fpoint.java
  55. +7 −0 src/main/java/com/jchart/model/Frect.java
  56. +294 −0 src/main/java/com/jchart/model/InitParmParser.java
  57. +7 −0 src/main/java/com/jchart/model/Irect.java
  58. +59 −0 src/main/java/com/jchart/model/JchartComposite.java
  59. +94 −0 src/main/java/com/jchart/model/JchartModelFacade.java
  60. +231 −0 src/main/java/com/jchart/model/JchartRequest.java
  61. +30 −0 src/main/java/com/jchart/model/Kjchart.java
  62. +395 −0 src/main/java/com/jchart/model/PlotDataModel.java
  63. +50 −0 src/main/java/com/jchart/model/PlotRange.java
  64. +67 −0 src/main/java/com/jchart/model/Quote.java
  65. +489 −0 src/main/java/com/jchart/model/QuoteDataModel.java
  66. +43 −0 src/main/java/com/jchart/model/QuoteString.java
  67. +174 −0 src/main/java/com/jchart/model/TimeFrameModel.java
  68. +148 −0 src/main/java/com/jchart/model/Trendline.java
  69. +107 −0 src/main/java/com/jchart/model/YlabelCalc.java
  70. +24 −0 src/main/java/com/jchart/model/color/ColorFactory.java
  71. +170 −0 src/main/java/com/jchart/model/color/ColorScheme.java
  72. +32 −0 src/main/java/com/jchart/model/color/ColorSchemeAwt.java
  73. +68 −0 src/main/java/com/jchart/model/color/ColorValue.java
  74. +185 −0 src/main/java/com/jchart/model/indicator/Adx.java
  75. +114 −0 src/main/java/com/jchart/model/indicator/BollingerBands.java
  76. +15 −0 src/main/java/com/jchart/model/indicator/DataValImpl.java
  77. +46 −0 src/main/java/com/jchart/model/indicator/DateValue.java
  78. +57 −0 src/main/java/com/jchart/model/indicator/Ema.java
  79. +27 −0 src/main/java/com/jchart/model/indicator/Histogram.java
  80. +21 −0 src/main/java/com/jchart/model/indicator/IndicatorIntr.java
  81. +232 −0 src/main/java/com/jchart/model/indicator/IndicatorModel.java
  82. +64 −0 src/main/java/com/jchart/model/indicator/Macd.java
  83. +67 −0 src/main/java/com/jchart/model/indicator/PsrMoneyFlow.java
  84. +113 −0 src/main/java/com/jchart/model/indicator/RelativeStrength.java
  85. +68 −0 src/main/java/com/jchart/model/indicator/Rsi.java
  86. +40 −0 src/main/java/com/jchart/model/indicator/Sma.java
  87. +60 −0 src/main/java/com/jchart/model/indicator/Std.java
  88. +88 −0 src/main/java/com/jchart/model/indicator/Stochastic.java
  89. +452 −0 src/main/java/com/jchart/model/indicator/pnf/PnFCalc.java
  90. +179 −0 src/main/java/com/jchart/model/indicator/pnf/Pnf.java
  91. +53 −0 src/main/java/com/jchart/model/indicator/pnf/PnfItem.java
  92. +71 −0 src/main/java/com/jchart/stats/impl/Correlation.java
  93. +50 −0 src/main/java/com/jchart/stats/impl/Regression.java
  94. +36 −0 src/main/java/com/jchart/stats/impl/StandardDeviation.java
  95. +83 −0 src/main/java/com/jchart/stats/impl/StatsBean.java
  96. +29 −0 src/main/java/com/jchart/stats/impl/Zscore.java
  97. +98 −0 src/main/java/com/jchart/util/FormatUtils.java
  98. +33 −0 src/main/java/com/jchart/util/SleepThread.java
  99. +14 −0 src/main/java/com/jchart/view/client/ButtonBorderPanel.java
  100. +137 −0 src/main/java/com/jchart/view/client/ChartTypeView.java
  101. +92 −0 src/main/java/com/jchart/view/client/DlgColor.java
  102. +210 −0 src/main/java/com/jchart/view/client/DlgCompare.java
  103. +105 −0 src/main/java/com/jchart/view/client/DlgMA.java
  104. +92 −0 src/main/java/com/jchart/view/client/DlgRs.java
  105. +20 −0 src/main/java/com/jchart/view/client/ExchangeChoice.java
  106. +179 −0 src/main/java/com/jchart/view/client/FrmJchart.java
  107. +42 −0 src/main/java/com/jchart/view/client/IndexChoice.java
  108. +93 −0 src/main/java/com/jchart/view/client/LoadingPanel.java
  109. +259 −0 src/main/java/com/jchart/view/client/MouseAction.java
  110. +346 −0 src/main/java/com/jchart/view/client/PnlJchart.java
  111. +43 −0 src/main/java/com/jchart/view/client/PnlStats.java
  112. +180 −0 src/main/java/com/jchart/view/client/TimeFrameButtonView.java
  113. +13 −0 src/main/java/com/jchart/view/client/TopBorderPanel.java
  114. +20 −0 src/main/java/com/jchart/view/client/factory/GuiFactory.java
  115. +12 −0 src/main/java/com/jchart/view/client/factory/GuiFactoryIntr.java
  116. +16 −0 src/main/java/com/jchart/view/client/factory/PnlTopIntr.java
  117. +15 −0 src/main/java/com/jchart/view/client/factory/psr/PsrGuiFactory.java
  118. +265 −0 src/main/java/com/jchart/view/client/factory/psr/PsrPnlTop.java
  119. +56 −0 src/main/java/com/jchart/view/common/BorderPanel.java
  120. +74 −0 src/main/java/com/jchart/view/common/Graphport.java
  121. +793 −0 src/main/java/com/jchart/view/common/JchartCanvas.java
  122. +87 −0 src/main/java/com/jchart/view/common/JchartRenderer.java
  123. +1,500 −0 src/main/java/com/jchart/view/common/PlotJchart.java
  124. +15 −0 src/main/java/com/jchart/view/common/PnlJchartIntr.java
  125. +14 −0 src/main/resources/jchart.properties
  126. +60 −0 src/test/java/com/jchart/model/indicator/pnf/PnfItemReader.java
  127. +45 −0 src/test/java/com/jchart/model/indicator/pnf/TestBuySell.java
  128. +160 −0 src/test/java/com/jchart/model/indicator/pnf/TestPnFCalc.java
  129. +14 −0 src/test/java/com/jchart/stats/AllTestSuite.java
  130. +28 −0 src/test/java/com/jchart/stats/BaseStatsTest.java
  131. +48 −0 src/test/java/com/jchart/stats/TestCorrelation.java
  132. +122 −0 src/test/java/com/jchart/stats/TestRegression.java
  133. +57 −0 src/test/java/com/jchart/stats/TestStd.java
  134. +41 −0 src/test/java/com/jchart/stats/TestZscore.java
  135. +14 −0 src/test/resources/pnf/F_buysell_results.txt
  136. +2,516 −0 src/test/resources/pnf/F_raw.csv
View
@@ -0,0 +1,7 @@
+.gradle
+build
+bin
+output
+.classpath
+.project
+.settings
View
Oops, something went wrong.
View
@@ -5,7 +5,29 @@ Created by Paul S. Russo paul.russo@jchart.com
![alt text](https://raw.githubusercontent.com/jchart/jchart-chart/master/images/jchart_logo.gif "Jchart Logo")
![alt text](https://raw.githubusercontent.com/jchart/jchart-chart/master/images/qqq.png "Chart of QQQ")
-
+### Download and run in three steps
1. git clone https://github.com/jchart/jchart-chart.git
2. ./gradlew build
3. java -jar build/libs/jchart-chart.jar
+
+
+### Chart Types
+* Bar
+* CandleStick
+* Point and Figure
+
+### Indicators
+* Moving Averages
+* Bollinger Bands
+* MACD
+* MACD Histogram
+* Money FLow -- Paul Russo Created
+* Stochastic
+* Relative Strength Index - RSI
+* Average Directional Index - ADX
+
+### Trend Lines
+* Draw
+* Drag
+* Best fit line
+
View
@@ -0,0 +1,31 @@
+repositories {
+ mavenCentral()
+}
+
+apply plugin: 'java'
+apply plugin: 'eclipse'
+
+def jarName = 'jchart-chart.jar'
+
+def springVersion = '4.3.3.RELEASE'
+def junitVersion = '4.12'
+
+dependencies {
+ compile "org.springframework:spring-context:$springVersion"
+ testCompile "org.springframework:spring-test:$springVersion"
+ testCompile "junit:junit:$junitVersion"
+}
+
+jar.doFirst{
+ manifest {
+ attributes("Manifest-Version": "1.0",
+ "Created-By": "paul.russo@jchart.com",
+ "Specification-Title": "Jchart",
+ "Specification-Version": "2.0",
+ "Main-Class": "com.jchart.Jchart")
+ }
+}
+
+task wrapper(type: Wrapper) {
+ gradleVersion = '2.13'
+}
Binary file not shown.
@@ -0,0 +1,6 @@
+#Mon Oct 10 20:52:08 EDT 2016
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-bin.zip
View
@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
View
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,12 @@
+_DJI~DJ INDU AVERAGE
+_DJU~DJ UTIL AVERAGE
+_DJT~DJ TRANS AVERAGE
+_SPX~S&P 500 INDEX
+_NDX~NASDAQ 100
+_IXIC~NAS/NMS COMPSITE
+_SOXX~SEMICONDUCTOR
+_RUT~RUSSELL 2000 IND
+_NWX~NETWORK INDEX
+_TYX~30 Y TSY YLD NDX
+-IRX~13WK TSY YLD NDX
+_XAU~GOLD/SILVER INDX
Oops, something went wrong.

0 comments on commit c8bf0c5

Please sign in to comment.