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

Re: How to calculate STDev?



PureBytes Links

Trading Reference Links

I already tried to use that built in function.
Here is the way I did it:

Vars: STDEV(0), Prof(0);

Prof = 1 + PositionProfit(1)/(EntryPrice(1)*BigPointValue);
If LastBarOnChart and TotalTrades <> 0 then Begin
 STDEV = StdDev(Prof, TotalTrades);
End;

The Problem seems to be the word TotalTrades when calculating the STDEV.
There is an error message coming up saying that there is something wrong
with the MaxBarsBack setting.
So I varied the MaxBarsBack setting but that couldnt help!
Then I wrote 100 for TotalTrades and the code seemed to work.

What´s wrong with the above code?

Daniel
----- Original Message -----
From: "Charles Johnson" <cmjohnsonxx@xxxxxxxxx>
To: "Daniel Posmik" <daniel.posmik@xxxxxx>; <omega-list@xxxxxxxxxx>
Sent: Monday, March 31, 2003 11:56 PM
Subject: RE: How to calculate STDev?


> There is a built in function in TradeStation.
>
> -----Original Message-----
> From: Daniel Posmik [mailto:daniel.posmik@xxxxxx]
> Sent: Monday, March 31, 2003 4:39 PM
> To: omega-list@xxxxxxxxxx
> Subject: How to calculate STDev?
>
>
> I´d like to calculate the StDev of the Profits directly in the systemcode
> and export it to excel.
> Does anyone know how to calculate it?
>
> Regards,
> Daniel
>
>
>