TOTALDRAWDOWN

Top  Previous  Next

Keyword Description

Category-related / Category-legal.

Class

Function

Where Legal

Resources

Entry Logic

Exit Logic

Initial Size

Resize

(Pre-Category)

Resize

(Category-Level)

 

 

 

l

l

l

Syntax

TOTALDRAWDOWN

       

Return Value

Returns the total drawdown (reduction in total equity from the previous high) of all systems combined.  A return value of 13.79 means that at this moment, the portfolio's equity has fallen 13.79 percent from it's previous high.

Example

Sample code

IF TOTALDRAWDOWN < 20 THEN NEWCONTRACTS = MEMORY[1] ELSE NEWCONTRACTS = MY_POSITION_SIZE

' Mechanica interprets TOTALDRAWDOWN < 20 to mean TOTALDRAWDOWN < 20%

 

ThumbTack white

Must be used in it's verbose form within Categories. That is, use the entire word, "TOTALDRAWDOWN" since there is no "DRAWDOWN" Category keyword.