logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
dieselpr  
#1 Posted : Monday, August 15, 2005 7:10:42 PM(UTC)
dieselpr

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/27/2005(UTC)
Posts: 130

I know I can use the points only backtester in metastock but the bottomline is I don't trust the results. Can anyone help me with this design working off a latching system. {Back tester for points only} x:=fml("Your Formule Name here"); {Alway use a latching formula this system is design to work with a latch only} buy:=ValueWhen(1,x=1 AND ref(x=0,-1) OR x=1 AND ref(x=-1,-1),O); sell:=ValueWhen(1,x=-1 AND ref(x=0,-1) OR x=-1 AND ref(x=1,-1),O); buyexit:=ValueWhen(1,x=0 AND ref(x=1,-1) OR x=-1 AND ref(x=1,-1),O); sellexit:=ValueWhen(1,x=0 AND ref(x=-1,-1) OR x=1 AND ref(x=-1,-1),O); {Profit} profitbuy:=If(buyexit>buy,buyexit-buy,0); profitsell:=If(sellexit<sell,sell-sellexit,0); {Lost} lostbuy:=If(buyexit<buy,buy-buyexit,0); lostsell:=If(sellexit>sell,sellexit-sell,0); profitable:=cum(profitbuy+profitsell); notprofitable:=cum(lostbuy+lostsell); profitable; notprofitable; {Design Idea is when the latch turns on I want the value of the open and when the latch goes off I want the value of the open subtract from when the latch turned on. Then I want to add up all the value from the profitable ones and then subtract that value from all the unprofitable values for a total. The total should then tell me if the system is profitable or not}
Jose  
#2 Posted : Tuesday, August 16, 2005 9:30:11 AM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
Dieselpr, check out Roy's excellent collection of Trade Equity indicators at: http://www.metastocktips.co.nz or http://metastocktools.com/#roy jose '-) http://metastocktools.com
Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.