Syntax Quicksheet

A quick reference guide to Control Tower’s syntax for your PineScript alerts.  Refer to our full documentation for detailed descriptions and examples.

ARGUMENT
DESCRIPTION
EXAMPLE

productID

A string identifying the product registered with your license.   Default is “f1”.   Required.

productID:f1

symbol

A string containing the chart symbol you wish to trade.  Required.

symbol:EURUSD

lots

An integer of the number of standard lots you wish to trade.  Required.

lots:0.4

risk

An integer of the percentage of your account equity you wish to trade.  Required.

risk:2

stopLoss

An integer of the price where you want to place the stop loss.

stopLoss:1.12

takeProfit

An integer of the price where you want to place the take profit. Required.

takeProfit:2.34

magicNumber

An integer assigning a Magic Number to the order which is useful if multiple positions have been opened on the same symbol.

magicNumber:1234

openPrice

An integer of the price where you want the order to execute.

openPrice:1.34

closePercentage

An integer used with LongExit or ShortExit.  This is the percentage of your position you want to exit at the specified takeProfit price.

closePercentage:25

action

A string containing one of 9 options of trade order types.  Required.

action: see below

The action argument has specific values which can be used:

action VALUES

DESCRIPTION

EXAMPLE

LongEntry

Used for placing opening market orders long.

action:LongEntry

ShortEntry

Used for placing opening market orders short.

action:ShortEntry

LongExit

Used for placing closing market orders which are long.

action:LongExit

ShortExit

Used for placing closing market orders which are short.

action:ShortExit

buyLimit

Used for setting limit orders in the long direction.

action:buyLimit

sellLimit

Used for setting limit orders in the short direction.

action:sellLimit

buyStop

Used for setting a long stop-limit order.

action:buyStop

sellStop

Used for setting a short stop-limit order.

action:sellStop

modifyOrder

Used for changing parameters of an open position, specifically stopLoss and takeProfit.

action:modifyOrder