Easy Safeties

DeactivateAfterEnterOrder

Deactivates the bot after an enter order has been completed.

Syntax: DeactivateAfterEnterOrder([ positionCount ])

Returns true when the bot has been deactivated.

Return type: Boolean

Parameter NameParameter TypeRequiredSuggestions

positionCount

Number

False

Input,Number,SessionGet

DeactivateAfterExitOrder

Deactivates the bot after an exit order has been completed.

Syntax: DeactivateAfterExitOrder([ positionCount ])

Returns true when the bot has been deactivated.

Return type: Boolean

Parameter NameParameter TypeRequiredSuggestions

positionCount

Number

False

Input,Number,SessionGet

DeactivateAfterXActiveMinutes

Deactivates the bot when the is active for a certain time.

Syntax: DeactivateAfterXActiveMinutes(minutes)

Returns true when the bot has been deactivated.

Return type: Boolean

Parameter NameParameter TypeRequiredSuggestions

minutes

Number

True

Input,Number,SessionGet

DeactivateAfterXIdleMinutes

Deactivates the bot if the last completed order is a number of minutes in the past. Timeout starts after the first completed order.

Syntax: DeactivateAfterXIdleMinutes(minutes)

Returns true when the bot has been deactivated.

Return type: Boolean

Parameter NameParameter TypeRequiredSuggestions

minutes

Number

True

Input,Number,SessionGet

DeactivateAfterXOrders

Deactivates the bot after a number of orders has been completed.

Syntax: DeactivateAfterXOrders([ count ])

Returns true when the bot has been deactivated.

Return type: Boolean

Parameter NameParameter TypeRequiredSuggestions

count

Number

False

Input,Number,SessionGet

DeactivateAfterXPositions

Deactivates the bot after a number of positions has been completed.

Syntax: DeactivateAfterXPositions([ count ])

Returns true when the bot has been deactivated.

Return type: Boolean

Parameter NameParameter TypeRequiredSuggestions

count

Number

False

Input,Number,SessionGet

DeactivateOnLoss

Deactivates the bot when there is no open position and the ROI based losses have reached a certain level.

Syntax: DeactivateOnLoss(maxLoss)

Returns true when the bot has been deactivated.

Return type: Boolean

Parameter NameParameter TypeRequiredSuggestions

maxLoss

Number

True

Input,Number,SessionGet

DeactivateOnProfit

Deactivates the bot when there is no open position and the ROI based profits have reached a certain level.

Syntax: DeactivateOnProfit(minProfit)

Returns true when the bot has been deactivated.

Return type: Boolean

Parameter NameParameter TypeRequiredSuggestions

minProfit

Number

True

Input,Number,SessionGet

DynamicStopLoss

Calculates the dynamic stop loss price and compares it with the current exit price.

Syntax: DynamicStopLoss(percentage, [ depth ], [ positionId ], [ direction ])

Returns true is the stop loss price has been breached.

Return type: Boolean

Parameter NameParameter TypeRequiredSuggestions

percentage

Number

True

Input,Number,SessionGet

depth

Number

False

Input,Number,SessionGet

positionId

String

False

Load

direction

Enum

False

PositionLong,PositionShort,NoPosition

DynamicTakeProfit

Calculates the dynamic take profit price and compares it with the current exit price.

Syntax: DynamicTakeProfit(percentage, [ depth ], [ positionId ], [ direction ])

Returns true is the take profit price has been breached.

Return type: Boolean

Parameter NameParameter TypeRequiredSuggestions

percentage

Number

True

Input,Number,SessionGet

depth

Number

False

Input,Number,SessionGet

positionId

String

False

Load

direction

Enum

False

PositionLong,PositionShort,NoPosition

GrowingTrailingStopLoss

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.

Syntax: GrowingTrailingStopLoss(percentage, growPercentage, [ positionId ], [ direction ])

Returns true if the stop loss has been hit.

Return type: Boolean

Parameter NameParameter TypeRequiredSuggestions

percentage

Number

True

Input,Number,SessionGet

growPercentage

Number

True

Input,Number,SessionGet

positionId

String

False

Load

direction

Enum

False

PositionLong,PositionShort,NoPosition

ShrinkingTrailingStopLoss

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.

Syntax: ShrinkingTrailingStopLoss(percentage, shrinkPercentage, [ positionId ], [ direction ])

Returns true if the stop loss has been hit.

Return type: Boolean

Parameter NameParameter TypeRequiredSuggestions

percentage

Number

True

Input,Number,SessionGet

shrinkPercentage

Number

True

Input,Number,SessionGet

positionId

String

False

Load

direction

Enum

False

PositionLong,PositionShort,NoPosition

StopLoss

Calculates the current percentage change from the average enter price and compares it with the stop loss value.

Syntax: StopLoss(percentage, [ positionId ], [ direction ])

Returns true if the stop loss has been hit.

Return type: Boolean

Parameter NameParameter TypeRequiredSuggestions

percentage

Number

True

Input,Number,SessionGet

positionId

String

False

Load

direction

Enum

False

PositionLong,PositionShort,NoPosition

StopLossROI

Calculates the defined position's current ROI percentage and gives a signal if the set loss is reached.

Syntax: StopLossROI(percentage, [ positionId ], [ direction ])

Returns true if the stop loss has been hit.

Return type: Boolean

Parameter NameParameter TypeRequiredSuggestions

percentage

Number

True

Input,Number,SessionGet

positionId

String

False

Load

direction

Enum

False

PositionLong,PositionShort,NoPosition

TakeProfit

Calculates the current percentage change from the average enter price and compares it with the take profit value.

Syntax: TakeProfit(percentage, [ positionId ], [ direction ])

Returns true if the take profit has been reached.

Return type: Boolean

Parameter NameParameter TypeRequiredSuggestions

percentage

Number

True

Input,Number,SessionGet

positionId

String

False

Load

direction

Enum

False

PositionLong,PositionShort,NoPosition

TakeProfitROI

Calculates the defined position's current ROI percentage and gives a signal if the set profit is reached.

Syntax: TakeProfitROI(percentage, [ positionId ], [ direction ])

Returns true if the take profit has been reached.

Return type: Boolean

Parameter NameParameter TypeRequiredSuggestions

percentage

Number

True

Input,Number,SessionGet

positionId

String

False

Load

direction

Enum

False

PositionLong,PositionShort,NoPosition

TrailingArmStopLoss

Keeps track of the highest/lowest recorded price and adjust the stop loss accordingly when the arm% has been reached.

Syntax: TrailingArmStopLoss(percentage, arm, [ positionId ], [ direction ])

Returns true if the stop loss has been hit.

Return type: Boolean

Parameter NameParameter TypeRequiredSuggestions

percentage

Number

True

Input,Number,SessionGet

arm

Number

True

Input,Number,SessionGet

positionId

String

False

Load

direction

Enum

False

PositionLong,PositionShort,NoPosition

TrailingStopLoss

Keeps track of the highest/lowest recorded price and adjust the stop loss accordingly.

Syntax: TrailingStopLoss(percentage, [ positionId ], [ direction ])

Returns true if the stop loss has been hit.

Return type: Boolean

Parameter NameParameter TypeRequiredSuggestions

percentage

Number

True

Input,Number,SessionGet

positionId

String

False

Load

direction

Enum

False

PositionLong,PositionShort,NoPosition

Last updated