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

Re: Calculation Problem



PureBytes Links

Trading Reference Links

Although the bonds are shown on the screen in 32nds, in the file they are in
decimals. Try using a point falue of 1000 which is, of course the big point
value. I haven't tried this code, but I think it should work.
Karl

-----Original Message-----
From: William C. Daniel <bogeybunky@adelphia.net>
To: Omega List <omega-list@eskimo.com>
Date: Sunday, November 05, 2000 11:24 AM
Subject: Calculation Problem


>I use the following code to plot a continuously updated P&L on my S&P
chart.
>However, when I use the same code on Bonds it does not calculate properly
>because of the fractions.  Any suggestions will be appreciated.  Thanks.
>
>Inputs: EntryPr(Close), PtVal(31.25), NumContr(1), Comm(21.58);
>Vars: Profits(0);
>
>Profits = (Close - EntryPr)*NumContr*PtVal-NumContr*Comm;
>Plot1(Profits, "Profit/Loss");
>Plot2(0, "Breakeven");
>
>If BarNumber = 1 then
> value1 = Text_New(date, time, Close,NumToStr(profits,0))
>else begin
> value2 = Text_SetLocation(value1, Date, Time+22,Close);
> value2 = Text_SetString(value1,NumToStr(profits,0));
> If Profits > 0 then value2 = Text_SetColor(Value1,DarkGreen)
> else value2 = Text_SetColor(Value1,Red);
>
>end;
>
>Thanks.
>Bill
>
>
>