PDA

View Full Version : Coding Errors


basil
7th December 2003, 02:10 PM
Hi David,

I have attached the code for a system I am developing and I am struggling to find out where I am making errors. I have just attached the long side for simplicity and was hoping you might be able to shed some light on what I am doing wrong. Although the Metastock search it is not rejecting securities I am getting this error message in Tradesim.

9:59:35 PM: Loading C:\TradeSimData\testtest.trb
9:59:35 PM: Starting Trade Database Error Report
------------------------------------------------------------------------------
------------------------------------------------------------------------------
9:59:35 PM: Ending Trade Database Error Report
9:59:35 PM: Trade Database Processing Error caused by: No valid trading records in database
9:59:35 PM: Error Processing Trade Database - Check Message Log for Details: Process Aborted

LongEntryTrigger:= (Cross(C,Ref(HHV(H,3),-1)) AND OPEN>Ref(C,-1));
LongEntryPrice := OPEN;
LongExitTrigger:= Cross(Ref(LLV(LOW,3),-1),LOW);
LongExitPrice:= OPEN;
LongInitialStop := Ref(LLV(LOW,3),-1);

ExtFml("Tradesim.Initialize");
ExtFml("TradeSim.SetStartRecordDate",01,06,1996);
ExtFml("TradeSim.SetStopRecordDate",07,11,2003);
ExtFml( "TradeSim.SetExitPriceToInitialStop");
ExtFml( "TradeSim.SetStopGapPriceToOpen");
ExtFml("Tradesim.RecordTrades",
"testtest",
LONG,
LongEntryTrigger,
LongEntryPrice,
LongInitialStop,
LongExitTrigger,
LongExitPrice,
START);

Any help would be appreciated

Thanks

Basil

David Samborsky
8th December 2003, 02:35 AM
Hello Basil

First thing to do is to check your Exploration options and check that you are not using the minimum number of records for each security. The number of records used should reflect the date range of interest. In your example 7 years x 255 days/year = 1785 make ir 2000.

Also check the explorer report and error log for more details if any.

basil
15th December 2003, 01:06 PM
Thanks David - so simple - that solved it.