[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I specify 'Current Available Equity' In EasyLanguage?



PureBytes Links

Trading Reference Links

At 3:31 PM -0500 11/11/00, Robert Cavaleri wrote:

>I am trying to adapt one of my systems to use cost management, and
>want to control the number of shares bought/sold based on a risk
>formula. However, to calculate the risk, I need to know what is my
>current equity. I don't see this function anywhere in the help index,
>does someone know how to compute your current available equity?

Your account value consists of three parts:

  > Starting balance - The money you deposit with the broker.

  > NetProfit - Total profit/loss on all closed trades

  > OpenPositionProfit - The profit/loss on open trades

TradeStation does not know how much money you deposited with your broker so you have to tell it as an Input. Frome these you can calculate your account value at any bar:

  Input: StartValue(30000), ....

  Vars: AccValue(0);

  AccValue = StartValue + NetProfit + OpenPositionProfit

Hope this helps.

Bob Fulks