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

Re: Profit/Loss Index Calculation



PureBytes Links

Trading Reference Links

answers to your 3 questions
1.a. I have created the table on the spot (and out of the blue), since I could not quickly
       write the right code for it "in natural life", let alone in the MetaStock language
       (eg and since Lionel did ask me about it + that it was in my head all of the time,
       but just couldn't find the time to pin it down).
       So creating the table in Excel did took me one night + a day later to check it all
       over again after a good night sleep and a day's rest at work.......).
   b. From the above: it could be used 'stand alone' as well as that it could also be
       linked (to cells, columns, sheets or a database).
   c. From it also, you could make report-sheet(s).
2. The "profits" and "loses" will most likely have to come from calculations made
     elsewhere (cells/columns/sheets) or be linked from other suitable sources(files/databases).
3.  If I do these type of 'book-keeping-calculations-turning-into-my-reports-using-a-single-table'
     than usualy having no more than 2 or 3 worksheets into 1 workbook is sufficient enough to
     "oversee" all the links+calculations that are involved, where the 3td sheet than holds any
     OLE/DB links, the 2nd sheet the crunching celltocell-links + cells with formulas, and
     the 1st sheet the "report-table" + celltocell-links + the 'final' formulas cells.
      'Overseeing' all of this spaghetti for links, is then the worst of my worries, but the
      final  -and good-  results will then already have fully made up for it. Push-button automation
      can then indeed be most handy when opening/maintaining this little 'database'.

Note that for the final daily moving index (like in the Metastock P/L Index), results will still have
to be summed (Sum(Data Array,Periods)).

Regards,
Ton Maas
ms-irb@xxxxxxxxxxxxxxxx
Dismiss the ".nospam" bit (including the dot) when replying and
note the new address change. Also for my Homepage
http://home.planet.nl/~anthmaas


----- Original Message ----- 
From: Walter Lake <wlake@xxxxxxxxx>
To: <metastock@xxxxxxxxxxxxx>
Sent: zondag 7 november 1999 18:06
Subject: Re: Profit/Loss Index Calculation


> Hi Ton
> 
> Thanks for the compliments. I thought that you would like the
> Worksheet/Chart export to GIF program.
> 
> Is this calculation something that you use as a stand alone or is it
> embedded in a reporting worksheet?
> 
> I assume that the "profits" and "losses" columns would be manually updated
> at the close of a trade? daily, weekly?
> 
> Let me know because the VBA source code that I'm currently with may be
> suitable for "push button" recalculation/updating.
> 
> Best regards
> 
> Walter
> 
> ----- Original Message -----
> From: A.J. Maas
> To: Metastock-List
> Sent: Friday, November 05, 1999 3:56 PM
> Subject: Re: Profit/Loss Index Calculation
> 
> 
> Formulas for the Profit/Loss Index
> 
> Results: Difference:Units: P/L Index:
> Profits $Losses $Net in $Net in %Gross in $Unit in $UnitsRatioScale
> +100,-100
> 800-20=7803 900 %820204140:195.12
> 80-20=60300 %1002054:160.00
> 20-80=-60-300 %1002051:4-60.00
> 1000-500=500100 %150050032:133.33
> 500-1000=-500-100 %150050031:2-33.33
> 350-25=3251 300 %375251514:186.67
> 2200-1200=100083 %340012002.832:129.41
> 1500-175=1325757 %16751759.579:179.10
> 1-100=-99-9 900 %10111011:100-98.02
> 1-200=-199-19 900 %20112011:200-99.00
> 1-2000=-1999-199 900 %2001120011:2000-99.90
> 
> 
> -Where the "Profits in $" is col A
> 
> -Where the "Losses in $" is col C
> 
> -Where the Formula for the "Net Difference in $" (col E) cell on Row 3 is:
>               =((-C3)+A3)
> -Where the Formula for the "Unit in $" (col H) cell on Row 3 is:
>               =IF(A3>=C3;C3;A3)
> -Where the Formula for the "Units" (col I) cell on Row 3 is:
>               =ABS(IF(A3>C3;((A3)/C3)+1;IF(A3<C3;((-C3)/A3)-1;0)))
> -Where the Formula for the "P/L Index Scale +100,-100" (col K) cell on Row 3
> is:
>               =E3/((H3*I3)*0.01)
> -Where I hope this has helped..........
> 
> Regards,
> Ton Maas
> ms-irb@xxxxxxxxxxxxxxxx
> Dismiss the ".nospam" bit (including the dot) when replying and
> note the new address change. Also for my Homepage
> http://home.planet.nl/~anthmaas
> 
> 
> ----- Original Message -----
> From: Lionel Issen <lissen@xxxxxxxx> <lissen@xxxxxxx>
> To: <metastock@xxxxxxxxxxxxx>
> Sent: woensdag 3 november 1999 13:37
> Subject: Re: Profit/Loss Index Calculation
> 
> 
> > Ton:
> >
> > Perhaps the formula is something like this:
> >
> > (P-L)/(P+L)*100.
> >
> > This will vary between +100 and -100.
> >
> > Your formula gives infinity if L=0.
> >
> > regards
> >
> > Lionel
> 
>