sql-synergy
Version:
Synergy Wave TA
37 lines (36 loc) • 1.14 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MSQuote = void 0;
const Technicals_1 = require("./Technicals");
const LoadData_1 = require("./LoadData");
class MSQuote extends Technicals_1.Technicals {
constructor(oTickerQuotes) {
super(oTickerQuotes);
}
// public getPeriod():number
// {
// return this.oTickerQuotes.getPeriod() ;
// }
getData(iPC) {
if (iPC < 0) {
throw Error("MSQuote getData " + iPC);
}
let oMSQ = MSQuote.oMap.get(this.oTickerQuotes.getSymbol() + '_' + iPC);
if (oMSQ !== undefined)
return oMSQ;
var oLoadData = new LoadData_1.LoadData(this.oTickerQuotes.getSymbol(), iPC);
oMSQ = oLoadData.getData();
if (oMSQ === undefined) {
console.log("**** IMPOSSIBLE SITUATION ****");
return this;
}
oMSQ.iPC = iPC;
MSQuote.oMap.set(this.oTickerQuotes.getSymbol() + '_' + iPC, oMSQ);
return oMSQ;
}
toString() {
return "" + typeof (this);
}
}
exports.MSQuote = MSQuote;
MSQuote.oMap = new Map();