Better SMA, still buggy

This commit is contained in:
2017-11-18 16:04:55 +01:00
parent 35a6bf4e45
commit 394c9caf31
3 changed files with 31 additions and 12 deletions

View File

@ -42,7 +42,7 @@ public class SMAIndicator implements Indicator {
indicator = new OHLCData();
}
int len = 38;
int len = 0;
float getAt(int pos) {
if (parent.size() == 0) {
@ -66,7 +66,7 @@ public class SMAIndicator implements Indicator {
return sum / (pos - start + 1);
}
void update() {
public void update() {
//parent = Globals.se.getOHLCdata(60000 * 10);
System.out.printf("Data %d\n", parent.size());