PDA

View Full Version : SetProfitStop


alikair
18th March 2004, 06:33 PM
SetProfitStop IS exiting out on the same bar i entered the trade. I believe its using the high of the day to exit, while im using the low of the day to enter. unfortunetly the high of the day is before the low of the day. so im cheating big time :P

Is there a way to delay the exit so that it cant happen the same bar as i entered the trade?

David Samborsky
19th March 2004, 03:04 AM
it compares the entry price with the exit price when it makes an evaluation of the profit gain. See pages 65-66 of the V3.0.0 User Manual for more information.

To be realistic you should not use the low of the day for entry because in reality you never know when the low point of the day has occured. The same applies to the high of the day. Also as you have pointed out you never know which order the high and low has occured. If you use the open for entry and close for exit then you know they always occur in the correct order. You could also used the closing price for the entry and exit because you know that profit gain will be zero on the entry bar so that you will never exit on the entry bar.

alikair
19th March 2004, 05:32 PM
I agree, it's not possible to tell what happens inside the bar, but that’s my whole point as well. If you don’t allow same bar enter and exit, then you don’t need to know. Here is an example.

Entry trigger 1.00
Exit trigger or (profit stop) 1.30

Day 1 low 1.00
Open 1.20
Close 1.20
High 1.30

On day 1 the low of the day would have triggered a buy, and that would be a realistic trigger point. Now add a delay on the exit (I use a barssince low<entry trigger >1 and it would not exit till the following day or more. And the exit would also be a realistic one.
If there was a way to add a one bar delay on the set profit stop that too would be a fair and realistic exit.

The alternative (using close or open / close) would have miss out altogether.

David Samborsky
22nd March 2004, 02:32 AM
Just to avoid any confusion what are you using for your entry and exit prices?

alikair
22nd March 2004, 06:27 AM
My entry and exit points are triggered by the low and high of the bar. I tell the program that if the low of the day drops below a set point, then enter the trade at that point (not the low of the day). Same idea goes for the exit.
In other words my program buys when xwz drops below $1.00 and if it does, to buy at $1.00. the same goes for the high.
Its the same way I trade in real life. I dont wait for a stock to pass my entry trigger, soon as it does.... im in. I'm a knife catching fool, what can I say :wink:

David Samborsky
23rd March 2004, 01:32 AM
Have posted an update of the TradeSim.dll.

TradeSim.dll V4.2.2 is available for download from

http://www.compuvision.com.au/DownloadTradeSim.htm

Description of additions and enhancements

Added inactivity delay to the ProfitStop function to delay the time when a profit comparison is made. By default this is set to zero which means that a profit comparison is made on the entry bar. To set a profitstop inactivity delay use the following calling convention:-

ExtFml( "TradeSim.SetProfitStopInactivityDelay",DELAY).

If you don't wish to make a profit comparison on the entry bar then DELAY should be made greater or equal to one.

Added SetExitPriceToProfitStop function which when used with ProfitStops enabled forces all profit stops to exit at the profit threshold rather than the price specified by the ExitPrice parameter in the RecordTrades function. This is useful for intraday exits. To enable this use the following calling convention:-

ExtFml( "TradeSim.SetExitPriceToProfitStop").

alikair
23rd March 2004, 03:37 AM
Thanks, Ill give it a try tonight :shock: