Package velox.api.layer1.messages
Class Layer1ApiSetTrailingStopMessage
java.lang.Object
velox.api.layer1.messages.Layer1ApiTradingMessageWithCallback
velox.api.layer1.messages.Layer1ApiSetTrailingStopMessage
Request to change the Trailing Stop settings in the Trading Control Panel.
Send via
Send via
Layer1ApiAdminProvider.sendUserMessage(Object)
This message is only processed if it was sent from a trading strategy (see Layer1TradingStrategy).
Works only when the Trading Control Panel is enabled.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class velox.api.layer1.messages.Layer1ApiTradingMessageWithCallback
Layer1ApiTradingMessageWithCallback.Response, Layer1ApiTradingMessageWithCallback.TradingMessageResponseListener -
Field Summary
FieldsFields inherited from class velox.api.layer1.messages.Layer1ApiTradingMessageWithCallback
alias, listener -
Constructor Summary
ConstructorsConstructorDescriptionLayer1ApiSetTrailingStopMessage(String alias, int trailingStep, Layer1ApiTradingMessageWithCallback.TradingMessageResponseListener listener) Creates a message to enable trailing stop with the given trailing step.Layer1ApiSetTrailingStopMessage(String alias, Layer1ApiTradingMessageWithCallback.TradingMessageResponseListener listener) Creates a message to disable trailing stop. -
Method Summary
-
Field Details
-
enabled
public final boolean enabled -
trailingStep
public final int trailingStep
-
-
Constructor Details
-
Layer1ApiSetTrailingStopMessage
public Layer1ApiSetTrailingStopMessage(String alias, int trailingStep, Layer1ApiTradingMessageWithCallback.TradingMessageResponseListener listener) Creates a message to enable trailing stop with the given trailing step.The
trailingStepmust be greater than 0 - enabling trailing stop without a step is meaningless. To turn trailing stop off, useLayer1ApiSetTrailingStopMessage(String, TradingMessageResponseListener)instead.- Parameters:
trailingStep- trailing step in ticks (> 0)- Throws:
IllegalArgumentException- iftrailingStepis not greater than 0
-
Layer1ApiSetTrailingStopMessage
public Layer1ApiSetTrailingStopMessage(String alias, Layer1ApiTradingMessageWithCallback.TradingMessageResponseListener listener) Creates a message to disable trailing stop. The trailing step is not applicable and is set to 0.
-
-
Method Details