Class StopLossRuleMaster

java.lang.Object
  extended bySwarmObjectImpl
      extended byBasicSumRuleMaster
          extended byStopLossRuleMaster

public class StopLossRuleMaster
extends BasicSumRuleMaster

This is the StopLossRuleMaster, used by StopLossAgent.

Author:
Bruno Mencarelli
See Also:
Serialized Form

Field Summary
 
Fields inherited from class BasicSumRuleMaster
agentProbToActBelowFloorP, agentProbToActInOpeningOrClosingAuctions, asymmetricRange, floorP, maxCorrectingCoeff, minCorrectingCoeff
 
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 getPriceInOpeningOrClosingAuctions(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 BasicSumRuleMaster
setAgentProbToActInOpeningOrClosingAuctions, setAsymmetricRange, setFloorP$andAgentProbToActBelowFloorP, setMaxCorrectingCoeff, setMinCorrectingCoeff
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StopLossRuleMaster

public StopLossRuleMaster(Zone aZone)
Constructor for a new StopLoss Rule Master.

Method Detail

getPriceInOpeningOrClosingAuctions

public double getPriceInOpeningOrClosingAuctions(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.