PDA

View Full Version : Is this a valid exit price condition?


Adrian Miller
1st May 2006, 12:09 PM
Hi Jose,

I was wandering whether you could tell me whether this code is valid?

LongExitPrice:=If(LongExitPrice<H,H,LongExitPrice);

My exit condition for long trades is intraday : L < Ref(LLV(L,8),-1);

If I include the LongExitPrice:=If(LongExitPrice<H,H,LongExitPrice); condition, open trades are passed through to the Tradelog.

If I do not include the above code, all open trades are rejected at the Metastock explorer stage, and the error log contains the error code:

Exit price < Exit price low for those open trades. Does this code invalidate other results in the database (ie trades that are not open trades?)

The reason I ask is that the results are worse if I don't include this piece of code (less profit and increased drawdwon)

I have been unable to spot any errors in the tradelog with this code, but I seem to recall reading somewhere that this piece of code should not be used.

Can you enlighten me please?

Thanks for your help in advance

Adrian

Jose
3rd May 2006, 02:48 PM
Without looking at your complete code, I would say that it is using hindsight. i.e., trades exit retrospectively on the High of the signal day.


jose '-)

Adrian Miller
7th May 2006, 11:04 PM
Hi Jose,

You are correct. Found out myself

Thanks for confirming

Adrian