GetNetLiq ();


The GetNetLiq function returns the net liquidation value for the currently selected account. It is the current account value if all the positions on that account were to be closed at the current market price.

Note: Studies that use this function return N/A if chart property Show Extended-Hours Trading session is de-activated. To make sure this property is activated, navigate to Style -> Settings and then choose the tab that corresponds to the type of security you are currently analyzing: Equities, Options, or Futures. The Show Extended-Hours Trading session checkbox is located in the Axis area in the lower half of each of these tabs.


The example script below plots the net liquidation value of the currently selected account on a lower subgraph. The value will be plotted as a histogram, which will change its color based on whether the value is positive or negative.

declare lower;

plot AccountNetLiq = GetNetLiq();
plot ZeroLine = 0;

AccountNetLiq.DefineColor("Positive", Color.UPTICK);
AccountNetLiq.DefineColor("Negative", Color.DOWNTICK);
AccountNetLiq.AssignValueColor(if AccountNetLiq >= 0
then AccountNetLiq.Color("Positive")
else AccountNetLiq.Color("Negative"));