Round down quantities to buy or sell (used for stocks with the instruction to buy an amount in cash).
Syntax:
| 
					 1  | 
						ROUNDEDDOWN  | 
					
Round down quantities to buy or sell (used for stocks with the instruction to buy an amount in cash).
Syntax:
| 
					 1  | 
						ROUNDEDDOWN  | 
					
Round up quantities to buy or sell (used for stocks with the instruction to buy an amount in cash).
Syntax:
| 
					 1  | 
						ROUNDEDUP  | 
					
Instruction to close a long position.
Syntax:
| 
					 1  | 
						SELL  | 
					
Example :
| 
					 1 2 3  | 
						If LongOnMarket AND ExitConditions THEN    SELL AT MARKET ENDIF  | 
					
Instruction to open a short position.
Syntax:
| 
					 1  | 
						SELLSHORT  | 
					
Example :
| 
					 1 2 3  | 
						IF NOT ShortOnMarket AND ShortConditions THEN   SELLSHORT 1 SHARES AT MARKET  ENDIF  | 
					
Determines the type of order: either target or stop.
You should look at the “SET TARGET” and “SET STOP” function in the documentation:
“SET”‘ is an instruction used to set TARGET and STOP LOSS:
http://www.prorealcode.com/documentation/target/
http://www.prorealcode.com/documentation/stop/
Allows you to place a stop at X points / % / € / unit above the entry price of the position (for a buy order or below for a sellshort order).
SET STOP can be used with any of the PROFIT variation, such as:
Set Stop pProfit/%Profit/$Profit/Profit X
Example:
Put the order stoploss in profit at 10 points above the entry price:
| 
					 1  | 
						SET STOP PPROFIT 10  | 
					
Allows you to place a target at X points / % / € / unit below the entry price of the position (in case of a buy order or above in case of a sellshort order), to limit your loosing position.
SET TARGET can be used with any of the LOSS variation, such as:
Set target ploss/%loss/$loss/loss X
Example:
Put the order takeprofit in loss at 10 points below the entry price (buy order case):
| 
					 1  | 
						SET TARGET PLOSS 10  | 
					
Designates the number of shares to buy or sell.
Syntax:
| 
					 1  | 
						SHARES  | 
					
Example :
| 
					 1 2 3 4 5 6  | 
						myMACD = MACD[12,26,9](close) short = myMACD crosses under 0 IF NOT ShortOnMarket AND short THEN    SELLSHORT 1 SHARES AT MARKET  ENDIF  | 
					
Indicates whether there are short positions or not already open.
Syntax:
| 
					 1  | 
						SHORTONMARKET  | 
					
Example :
| 
					 1 2 3 4 5 6  | 
						myMACD = MACD[12,26,9](close) short = myMACD crosses under 0 IF NOT ShortOnMarket AND short THEN   SELLSHORT 1 CONTRACTS AT MARKET  ENDIF  | 
					
Allows to know if a Short position has been opened on the candlestick N (N optional by default at 0). (more…)