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

Re: AN INTERESTINGLY USEFUL FUNCTION



PureBytes Links

Trading Reference Links

>Can anyone Please email or post the ela for a function for TS4, that
>will give the total profit or loss for a system for any particular day,
>instead of the Total profit for the run?
>I.E., i want to assign a variable the result of a call to function that
>will give the total profit or loss for the current day in history for the system being run.

You can look at the value of functions on each day and calculate the difference:

   if Date <> Date[1] then begin    {on the first bar odf the day}
      MyProfit = Profit - LProfit;  {find the difference}
      LProfit  = Profit;            {save the Profit for the next time}
   end;

   Profit = NetProfit + OpenPositionProfit;  {update Profit}

Bob Fulks