PDA

View Full Version : InitialStop and EnablePriceFilter gazing into the future to deicide exit


hanhao
26th October 2007, 05:23 AM
InitialStop and EnablePriceFilter gazing into the future to deicide exit

my settings:
entryprice:= Close;
InitialStop:=entryprice*.98; {use a 2% initial stop}
ExtFml("TradeSim.EnablePriceFilter");
ExtFml("TradeSim.EnableProtectiveStop",1);


Here is a perfect example of it using future values to decide when to exit.

http://img139.imageshack.us/img139/5466/65162095cq9.jpg

take note of the 2 pink rectangle values.
on 3/1/1999 the open is 0.85
as the day progresses the price moves down to my initial stop of $0.8379

instead of exiting at 0.8379, tradesim exited at open price 0.85. Isnt that cheating!? Anyone knows how do i solve the problem?
how do i make it exit at 0.8379 or 0.8379*0.99 ?

David Samborsky
26th October 2007, 12:16 PM
What is your exit price set to ??

hanhao
26th October 2007, 01:42 PM
What is your exit price set to ??

ExitTrigger:=C>Ref(HHV(H,5),-1);

AExitTrigger:=Ref(ExitTrigger,-1);
AExitPrice:=OPEN;

David Samborsky
27th October 2007, 02:52 AM
ExitTrigger:=C>Ref(HHV(H,5),-1);

AExitTrigger:=Ref(ExitTrigger,-1);
AExitPrice:=OPEN;

Use EnableDelayOfAllExitsByOneBar

ExtFml(“TradeSim.EnableDelayOfAllExitsByOneBar”);

This will delay all exits by one bar. Using this function there is no need to delay normal exits as in your formula above.

hanhao
28th October 2007, 11:59 AM
Use EnableDelayOfAllExitsByOneBar

ExtFml(“TradeSim.EnableDelayOfAllExitsByOneBar”);

This will delay all exits by one bar. Using this function there is no need to delay normal exits as in your formula above.

thanks for the advice but back to the original question.
it does delay the exit by 1 day which makes it not cheating anymore but still the exit prices are stuck at open price instead of an intraday exit

how do i make it intraday exit at 0.8379 or 0.8379*0.99 ?

David Samborsky
29th October 2007, 02:02 AM
Use SetExitPriceToInitialStop but then you shouldn't delay using EnableDelayOfAllExitsByOneBar.

hanhao
29th October 2007, 11:08 AM
Use SetExitPriceToInitialStop but then you shouldn't delay using EnableDelayOfAllExitsByOneBar.

thanks david, that did the trick
for other's reference, the full command is ExtFml("TradeSim.SetExitPriceToInitialStop");