PDA

View Full Version : Help with "Invalid exit price data"


PauDor
12th August 2004, 05:08 AM
Hi all,

Having some trouble correcting an "Invalid exit price data" error in my system and was hoping someone could help me out.

The error seems to occur when the price opens lower than the “Exit Price” for long positions.

LongEntryPrice := CLOSE;
LongExitTrigger := Cross(Ref(LLV(L,3),-1),L) ;
LongExitPrice :=
Ref(LLV(L,3),-1);
LongInitialStop := CLOSE-2*ATR(10);

ExtFml( "TradeSim.Initialize");
ExtFml("TradeSim.SetStartRecordDate",1,1,2001);
ExtFml("TradeSim.SetStopRecordDate",1,7,2004);
ExtFml( "TradeSim.EnableProtectiveStop",1) ;
ExtFml("TradeSim.RecordTrades",
"PD The Sqeeze 3",
Long,
longEntryTrigger,
longEntryPrice,
longInitialStop,
longExitTrigger ,
longExitPrice ,
START);

Hope this makes sense to someone.

P.S. It also got stopped out 4 times on the entry day which is hard to do when the entry is on the close.

Cheers

PauDor

Jose
13th August 2004, 11:18 PM
Try this:

LongExitPrice:=Ref(LLV(L,3),-1);
LongExitPrice:=If(LongExitPrice>H,H,LongExitPrice);
LongExitPrice&#58;=If&#40;LongExitPrice<L,L,LongExitPrice&#41;;


"P.S. It also got stopped out 4 times on the entry day which is hard to do when the entry is on the close."

Not knowing what your Entry trigger is, there is no way to find out what is wrong there.


jose '-)

PauDor
23rd August 2004, 12:31 AM
Thanks Jose,

That has fixed it.

Cheers,

Paul