Below are simplified versions of the risk-normalized profit Long & Short indicator set available with the URSC tool-kit & MACDH Divergence kit. These proprietary profit indicators can be a powerful part of any system development. They include risk normalization parameters, which allow rapid and valid comparisons between systems with markedly different risk profiles. They also include a Buy & Hold option and an annualized %pa function, for comparing a system's performance to a risk-normalized benchmark. http://www.metastocktools.com/URSC/URSC.htm http://www.metastocktools.com/MACDH/MACDHdiverg.htm MetaStock -> Tools -> Indicator Builder -> New -> -> copy & paste complete formulae between "---8<---" lines. =================== Profit Long % basic =================== ---8<------------------------------------------- { System Profit Long % - fixed trade size - v3.0 Basic code - Entry/Exit on Close of signal. Copyright © 2005-2007 Jose Silva. The grant of this license is for personal use only - no resale or repackaging allowed. All code remains the property of Jose Silva. http://www.metastocktools.com } {* Entry Long formula/reference *} { SMA crossover entry - do not trade! } entry:=Cross(Mov(C,5,S),Mov(C,10,S)); {* Exit Long formula/reference *} { Reverse SMA crossover exit } exit:=Cross(C,Mov(C,10,S)) AND Alert(entry,3)=0; { User inputs } plot:=Input("[1]%Profit curve, [2]MaxDD%, [3]Trade signals",1,3,1); cost:=Input("Total Transaction costs (Brokerage + Slippage) %:",0,100,.2)/200; { Trade Binary & clean Entry/Exit signals } init:=Cum(IsDefined(entry+exit))=1; flag:=ValueWhen(1,entry-exit<>0 OR init,entry); entry:=flag*(Alert(flag=0,2) OR entry*Cum(entry)=1); exit:=(flag=0)*(Alert(flag,2) OR exit*Cum(exit)=1); { Profit Long % curve } EntryVal:=ValueWhen(1,entry,C*(1+cost)); Profit:=C*(1-cost)/EntryVal-1; ProfitPer:=(flag*Profit+Cum(exit*Profit))*100; { Profit Long % max drawdown } MaxDD:= Highest(Max(Highest(ProfitPer),0)-ProfitPer); { Plot in own window below chart } If(plot=1,ProfitPer,If(plot=2,MaxDD,entry-exit)) ---8<------------------------------------------- ============================== Profit Long % Buy & Hold basic ============================== ---8<---------------------------------- { Buy & Hold Profit Long % curve - v3.0 Copyright © 2005-2007 Jose Silva. The grant of this license is for personal use only - no resale or repackaging allowed. All code remains the property of Jose Silva. http://www.metastocktools.com } {* Entry Long on first chart bar *} entry:=Cum(1)=1; {* Exit Long on last chart bar *} exit:=Cum(1)=LastValue(Cum(1)); { User inputs } plot:=Input("[1]%Profit curve, [2]MaxDD%, [3]Trade signals",1,3,1); cost:=Input("Total Transaction costs (Brokerage + Slippage) %:",0,100,.2)/200; { Trade Binary & clean Entry/Exit signals } init:=Cum(IsDefined(entry+exit))=1; flag:=ValueWhen(1,entry-exit<>0 OR init,entry); entry:=flag*(Alert(flag=0,2) OR entry*Cum(entry)=1); exit:=(flag=0)*(Alert(flag,2) OR exit*Cum(exit)=1); { Profit Long % curve } EntryVal:=ValueWhen(1,entry,C*(1+cost)); Profit:=C*(1-cost)/EntryVal-1; ProfitPer:=(flag*Profit+Cum(exit*Profit))*100; { Profit Long % max drawdown } MaxDD:= Highest(Max(Highest(ProfitPer),0)-ProfitPer); { Plot in own window below chart } If(plot=1,ProfitPer,If(plot=2,MaxDD,entry-exit)) ---8<---------------------------------- http://www.metastocktools.com