Class StopLossRuleMaster
java.lang.Object
SwarmObjectImpl
BasicSumRuleMaster
StopLossRuleMaster
- public class StopLossRuleMaster
- extends BasicSumRuleMaster
This is the StopLossRuleMaster, used by StopLossAgent.
- Author:
- Bruno Mencarelli
- See Also:
- Serialized Form
Constructor Summary |
StopLossRuleMaster(Zone aZone)
Constructor for a new StopLoss Rule Master. |
Method Summary |
double |
getPrice(double lp,
double p,
double stopLossMeanPrice,
double maxLossRate,
double shareQuantity,
int checkingIfShortOrLong)
This method allows the agent to apply the stoploss strategy during the simulated day. |
double |
getPriceBeforeOpening(double lp,
double p,
double stopLossMeanPrice,
double maxLossRate,
double shareQuantity,
int checkingIfShortOrLong)
This method allows the agent to apply the stoploss strategy in the first phase of the day. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StopLossRuleMaster
public StopLossRuleMaster(Zone aZone)
- Constructor for a new StopLoss Rule Master.
getPriceBeforeOpening
public double getPriceBeforeOpening(double lp,
double p,
double stopLossMeanPrice,
double maxLossRate,
double shareQuantity,
int checkingIfShortOrLong)
- This method allows the agent to apply the stoploss strategy in the first phase of the day.
getPrice
public double getPrice(double lp,
double p,
double stopLossMeanPrice,
double maxLossRate,
double shareQuantity,
int checkingIfShortOrLong)
- This method allows the agent to apply the stoploss strategy during the simulated day.