Easy Safeties
Deactivates the bot after an enter order has been completed.
- DeactivateAfterEnterOrder([ positionCount ])
Returns true when the bot has been deactivated.
Return Type: Boolean
Parameter Name | Parameter Type | Required | Suggested |
positionCount | Number | False | Input, Number, SessionGet |
Deactivates the bot after an exit order has been completed.
- DeactivateAfterExitOrder([ positionCount ])
Returns true when the bot has been deactivated.
Return Type: Boolean
Parameter Name | Parameter Type | Required | Suggested |
positionCount | Number | False | Input, Number, SessionGet |
Deactivates the bot when the is active for a certain time.
- DeactivateAfterXActiveMinutes(minutes)
Returns true when the bot has been deactivated.
Return Type: Boolean
Parameter Name | Parameter Type | Required | Suggested |
minutes | Number | True | Input, Number, SessionGet |
Deactivates the bot if the last completed order is a number of minutes in the past. Timeout starts after the first completed order.
- DeactivateAfterXIdleMinutes(minutes)
Returns true when the bot has been deactivated.
Return Type: Boolean
Parameter Name | Parameter Type | Required | Suggested |
minutes | Number | True | Input, Number, SessionGet |
Deactivates the bot after a number of orders has been completed.
- DeactivateAfterXOrders([ count ])
Returns true when the bot has been deactivated.
Return Type: Boolean
Parameter Name | Parameter Type | Required | Suggested |
count | Number | False | Input, Number, SessionGet |
Deactivates the bot after a number of positions has been completed.
- DeactivateAfterXPositions([ count ])
Returns true when the bot has been deactivated.
Return Type: Boolean
Parameter Name | Parameter Type | Required | Suggested |
count | Number | False | Input, Number, SessionGet |
Deactivates the bot when there is no open position and the ROI based losses have reached a certain level.
- DeactivateOnLoss(maxLoss)
Returns true when the bot has been deactivated.
Return Type: Boolean
Parameter Name | Parameter Type | Required | Suggested |
maxLoss | Number | True | Input, Number, SessionGet |
Deactivates the bot when there is no open position and the ROI based profits have reached a certain level.
- DeactivateOnProfit(minProfit)
Returns true when the bot has been deactivated.
Return Type: Boolean
Parameter Name | Parameter Type | Required | Suggested |
minProfit | Number | True | Input, Number, SessionGet |
Calculates the dynamic stop loss price and compares it with the current exit price.
- DynamicStopLoss(percentage, [ depth ], [ positionId ], [ direction ])
Returns true is the stop loss price has been breached.
Return Type: Boolean
Parameter Name | Parameter Type | Required | Suggested |
percentage | Number | True | Input, Number, SessionGet |
depth | Number | False | Input, Number, SessionGet |
positionId | String | False | Load |
direction | Enum | False | PositionLong, PositionShort, NoPosition |
Calculates the dynamic take profit price and compares it with the current exit price.
- DynamicTakeProfit(percentage, [ depth ], [ positionId ], [ direction ])
Returns true is the take profit price has been breached.
Return Type: Boolean
Parameter Name | Parameter Type | Required | Suggested |
percentage | Number | True | Input, Number, SessionGet |
depth | Number | False | Input, Number, SessionGet |
positionId | String | False | Load |
direction | Enum | False | PositionLong, PositionShort, NoPosition |
Keeps track of the highest/lowest recorded price and adjust the stop loss accordingly. The higher the price change the more the trailing distances grows.
- GrowingTrailingStopLoss(percentage, growPercentage, [ positionId ], [ direction ])
Returns true if the stop loss has been hit.
Return Type: Boolean
Parameter Name | Parameter Type | Required | Suggested |
percentage | Number | True | Input, Number, SessionGet |
growPercentage | Number | True | Input, Number, SessionGet |
positionId | String | False | Load |
direction | Enum | False | PositionLong, PositionShort, NoPosition |
Keeps track of the highest/lowest recorded price and adjust the stop loss accordingly. The higher the price change the more the trailing distances shrinks.
- ShrinkingTrailingStopLoss(percentage, shrinkPercentage, [ positionId ], [ direction ])
Returns true if the stop loss has been hit.
Return Type: Boolean
Parameter Name | Parameter Type | Required | Suggested |
percentage | Number | True | Input, Number, SessionGet |
shrinkPercentage | Number | True | Input, Number, SessionGet |
positionId | String | False | Load |
direction | Enum | False | PositionLong, PositionShort, NoPosition |
Calculates the current percentage change from the average enter price and compares it with the stop loss value.
- StopLoss(percentage, [ positionId ], [ direction ])
Returns true if the stop loss has been hit.
Return Type: Boolean
Parameter Name | Parameter Type | Required | Suggested |
percentage | Number | True | Input, Number, SessionGet |
positionId | String | False | Load |
direction | Enum | False | PositionLong, PositionShort, NoPosition |
Calculates the defined position's current ROI percentage and gives a signal if the set loss is reached.
- StopLossROI(percentage, [ positionId ], [ direction ])
Returns true if the stop loss has been hit.
Return Type: Boolean
Parameter Name | Parameter Type | Required | Suggested |
percentage | Number | True | Input, Number, SessionGet |
positionId | String | False | Load |
direction | Enum | False | PositionLong, PositionShort, NoPosition |
Calculates the current percentage change from the average enter price and compares it with the take profit value.
- TakeProfit(percentage, [ positionId ], [ direction ])
Returns true if the take profit has been reached.
Return Type: Boolean
Parameter Name | Parameter Type | Required | Suggested |
percentage | Number | True | Input, Number, SessionGet |
positionId | String | False | Load |
direction | Enum | False | PositionLong, PositionShort, NoPosition |
Calculates the defined position's current ROI percentage and gives a signal if the set profit is reached.
- TakeProfitROI(percentage, [ positionId ], [ direction ])
Returns true if the take profit has been reached.
Return Type: Boolean
Parameter Name | Parameter Type | Required | Suggested |
percentage | Number | True | Input, Number, SessionGet |
positionId | String | False | Load |
direction | Enum | False | PositionLong, PositionShort, NoPosition |
Keeps track of the highest/lowest recorded price and adjust the stop loss accordingly when the arm% has been reached.
- TrailingArmStopLoss(percentage, arm, [ positionId ], [ direction ])
Returns true if the stop loss has been hit.
Return Type: Boolean
Parameter Name | Parameter Type | Required | Suggested |
percentage | Number | True | Input, Number, SessionGet |
arm | Number | True | Input, Number, SessionGet |
positionId | String | False | Load |
direction | Enum | False | PositionLong, PositionShort, NoPosition |
Keeps track of the highest/lowest recorded price and adjust the stop loss accordingly.
- TrailingStopLoss(percentage, [ positionId ], [ direction ])
Returns true if the stop loss has been hit.
Return Type: Boolean
Parameter Name | Parameter Type | Required | Suggested |
percentage | Number | True | Input, Number, SessionGet |
positionId | String | False | Load |
direction | Enum | False | PositionLong, PositionShort, NoPosition |
Last modified 2yr ago