sql-synergy
Version:
Synergy Wave TA
33 lines (32 loc) • 1.11 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Step1Neutralized = void 0;
const Neutralization_1 = require("./Neutralization");
class Step1Neutralized {
constructor(oMSQuote, oWave, oPC) {
this.iNeutralizedOn = 0;
this.iPC = 0;
this.oMSQuote = oMSQuote;
this.oWave = oWave;
this.iPC = oPC.getPeriod();
this.oN = new Neutralization_1.Neutralization(oMSQuote, oPC);
}
wasNeutralized(iStart, iEnd) {
for (var i = iStart; i < iEnd; i++) {
if (this.canNeutralize(i))
break;
}
return this.iNeutralizedOn != 0;
}
canNeutralize(iDay) {
this.iNeutralizedOn = 0;
// String sName = oWave.getName ( ) ;
if (this.oWave.isUp())
this.iNeutralizedOn = this.oN.isDownWaveNeutralized(iDay);
else
this.iNeutralizedOn = this.oN.isUpWaveNeutralized(iDay);
// System.out.println ( sName + " Step1 Neutralized" ) ;
return this.iNeutralizedOn != 0;
}
}
exports.Step1Neutralized = Step1Neutralized;