Merge origin/master

This commit is contained in:
2017-11-19 18:21:54 +01:00
17 changed files with 146 additions and 78 deletions

View File

@ -42,10 +42,14 @@ public class SMAIndicator extends BaseIndicator {
this.parent = parent;
indicator = new OHLCData();
}
public void setParent(OHLCData parent){
}
int len = 20;
float getAt(int pos) {
private float getAt(int pos) {
if (parent.size() == 0) {
return 0;
}
@ -56,9 +60,7 @@ public class SMAIndicator extends BaseIndicator {
}
float sum = 0;
for (int i = start; i <= pos; i++) {
//sum += parent.get(i).getAverage();
sum += parent.get(i).close;
}
return sum / (pos - start + 1);