PDA

View Full Version : Help needed


hp
21st October 2003, 11:15 PM
When I try to test a simple long/short system which includes
Cross(C,Ref(HHV(H,3),-1)) as the Long Entry trigger,
Cross(Ref(LLV(L,3),-1),C) as the short Entry trigger,
Ref(LLV(L,3),-1) as the Long Initial stop,
Ref(HHV(H,3),-1) as the Short Initial stop,

I encounter several problems:
1. The trade database only shows the long trades. However, if I run the short side of the system separately, I now get the short trades. I cannot get Tradesim to bring up both the long and the short trades in the one database.
2. If I change the Initial stop to say
Ref(LLV(L,2),-1) for the long side and
Ref(HHV(H,2),-1) for the short side
there are some trades in the original database which are not in the new database (even though the entry is the same and should have been triggered in both instances and I am not already in the trade).

David Samborsky
22nd October 2003, 12:33 AM
You need to specify the filename in the second reference to the RecordTrades function although the documentation says that you don't have to. Make sure it is exactly the same as the filename specified in the call to first RecordTrades function. There is a bug in the RecordTrades function which will be corrected in the next release.

Also I recommend that you delete the trade database file before you regenerate it.

hp
22nd October 2003, 12:56 AM
Both the Long and Short sides call the record trades function and both have exactly the same name. I have also tried deleting the original databases but the results are still the same.

David Samborsky
22nd October 2003, 05:38 AM
Can you post or send me your trade database code.