EasyLanguage Reserved Words & Functions

SetProfitTarget (Reserved Word)

image\trumpet2.gif Disclaimer

SetProfitTarget is a built-in stop reserved word that enables you to specify the amount of profit you are looking to capture on a total position basis, or a  one contract or one share basis. Within a strategy an order to close your entire position is generated once the profit target amount has been reached. Whether the profit target amount is based on a position or per share/contract basis is determined by set function reserved words: SetStopPosition,  SetStopShare, or  Setstopcontract.

When used with an automated strategy where orders are being generated into the real-world, the profit exit limit order is immediately sent into the market to be filled.  If you lose internet connectivity, your profit target is still active, but your strategy can longer generate additional orders.

Normally strategies generate orders on the close of the bar for execution on the next bar, SetProfitTarget allows you to generate orders and exit on the same bar as the bar of entry, this is especially useful when working with longer during bars, (e.g. 30-min, 60-min, daily, weekly, monthly).

SetProfitTarget can only be used in a Strategy.

Usage

SetProfitTarget(Amount)

Input Parameters

Name Type Description
Amount Numeric Amount of profit in dollars, at which point the position will be closed.

Examples

When used with the SetStopPosition reserved word, the Amount parameter sets the stop loss as a dollar amount for the entire position based on the total number of shares or contracts in the current open position. (if you held 500 shares of MSFT and specified $200 profit amount, you would exit $0.40 from your entry price.)

SetStopPosition;

SetProfitTarget(200);

(SetStopPosition is the default setting and is optional)

When used with the SetStopShare or SetStopContract reserved words, the Amount parameter sets the profit as a one share or one contract amount.  (if you held 500 shares of MSFT and specified $0.60 profit amount, you would exit .60 from your entry price with a $300 profit.)

SetStopShare;

SetProfitTarget(.60);

(SetStopShare and SetStopContract are synonymous and both work for stock, futures, options, etc.)

Orders Generated

Limit Order to Sell (Long Exit) or Limit Order to Buy to Cover (Short Exit)

Signal Name

Profit Target

Related Topics

ProfitTarget (strategy), StopLoss (strategy), SetStopLoss , SetStopPosition , SetStopShare , SetStopContract