Skip to content

Commit

Permalink
天量程序,分析近10天的价格强度
Browse files Browse the repository at this point in the history
  • Loading branch information
jcai committed Nov 3, 2014
1 parent 20bc4cf commit b343ccd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class DayVolumeAnalyzer extends StockAnalyzer {

val currentVolume: Int = current.getInt("v")
if (currentVolume > av * 2) {
//求20天的价格强度
val arr = Range(pos - 1, pos - 1 - 20, -1).map(data.getJSONObject(_).getDouble("c")).toArray
//求10天的价格强度
val arr = Range(pos - 1, pos - 1 - 10, -1).map(data.getJSONObject(_).getDouble("c")).toArray
val strongRate = 0 - StockAlgorithm.calStrongRate(arr, arr.length)
if (math.abs(strongRate) > 0.01)
list += new VolumeStock(symbol, strongRate, currentVolume * 1.0 / av)
Expand Down

0 comments on commit b343ccd

Please sign in to comment.