[Blotter-commits] r1147 - pkg/blotter/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Aug 31 01:19:27 CEST 2012


Author: opentrades
Date: 2012-08-31 01:19:27 +0200 (Fri, 31 Aug 2012)
New Revision: 1147

Modified:
   pkg/blotter/R/chart.ME.R
Log:
added some visual improvements suggested by Samo Pahor



Modified: pkg/blotter/R/chart.ME.R
===================================================================
--- pkg/blotter/R/chart.ME.R	2012-08-29 10:15:20 UTC (rev 1146)
+++ pkg/blotter/R/chart.ME.R	2012-08-30 23:19:27 UTC (rev 1147)
@@ -66,8 +66,8 @@
                     xlab='Drawdown ($)', ylab='Profit (Loss) in $',
                     main='Maximum Adverse Excursion (MAE) in $')
 
-            points(abs(trades[ profitable, c('Drawdown','Net.Trading.PL')]), pch=2, col='green')
-            points(abs(trades[!profitable, c('Drawdown','Net.Trading.PL')]), pch=25, col='red')
+            points(abs(trades[ profitable, c('Drawdown','Net.Trading.PL')]), pch=24, col='green', bg='green', cex=0.6)
+            points(abs(trades[!profitable, c('Drawdown','Net.Trading.PL')]), pch=25, col='red', bg='red', cex=0.6)
         }
         else    # scale == 'percent'
         {
@@ -75,8 +75,8 @@
                     xlab='Drawdown (%)', ylab='Profit (Loss) in %',
                     main='Maximum Adverse Excursion (MAE) in %')
 
-            points(abs(trades[ profitable, c('Pct.Drawdown','Pct.Net.Trading.PL')]), pch=2, col='green')
-            points(abs(trades[!profitable, c('Pct.Drawdown','Pct.Net.Trading.PL')]), pch=25, col='red')
+            points(abs(trades[ profitable, c('Pct.Drawdown','Pct.Net.Trading.PL')]), pch=24, col='green', bg='green', cex=0.6)
+            points(abs(trades[!profitable, c('Pct.Drawdown','Pct.Net.Trading.PL')]), pch=25, col='red', bg='red', cex=0.6)
         }
     }
     else    # type == 'MFE'
@@ -87,8 +87,8 @@
                     xlab='RunUp ($)', ylab='Profit (Loss) in $',
                     main='Maximum Favourable Excursion (MFE) in $')
     
-            points(abs(trades[ profitable, c('RunUp','Net.Trading.PL')]), pch=2, col='green')
-            points(abs(trades[!profitable, c('RunUp','Net.Trading.PL')]), pch=25, col='red')
+            points(abs(trades[ profitable, c('RunUp','Net.Trading.PL')]), pch=24, col='green', bg='green', cex=0.6)
+            points(abs(trades[!profitable, c('RunUp','Net.Trading.PL')]), pch=25, col='red', bg='red', cex=0.6)
         }
         else    # scale == 'percent'
         {
@@ -96,8 +96,8 @@
                     xlab='RunUp (%)', ylab='Profit (Loss) in %',
                     main='Maximum Favourable Excursion (MFE) in %')
     
-            points(abs(trades[ profitable, c('Pct.RunUp','Pct.Net.Trading.PL')]), pch=2, col='green')
-            points(abs(trades[!profitable, c('Pct.RunUp','Pct.Net.Trading.PL')]), pch=25, col='red')
+            points(abs(trades[ profitable, c('Pct.RunUp','Pct.Net.Trading.PL')]), pch=24, col='green', bg='green', cex=0.6)
+            points(abs(trades[!profitable, c('Pct.RunUp','Pct.Net.Trading.PL')]), pch=25, col='red', bg='red', cex=0.6)
         }
     }
 
@@ -106,10 +106,11 @@
     grid()
 
     legend(
-            x='right', inset=0.1,
+            x='bottomright', inset=0.1,
             legend=c('Profitable Trade','Losing Trade'),
-            pch=c(2,6),
-            col=c('green','red')
+            pch=c(24,25),
+            col=c('green','red'),
+            pt.bg=c('green','red')
     )
 }
 



More information about the Blotter-commits mailing list