PDA

View Full Version : Short exit trigger


Jackie
20th September 2004, 02:27 AM
This is about a short system.
I have a trigger and an initial stop but I want to be able to exit at a certain price instead of a trailing price exit.

What is the coding for an exit using low of the candle the day before the trigger day minus 50 cents?
It is something like the following but I don't know how to code it.

ShortExitTrigger:= L<=(L - 0.50) of Ref(LongEntryTrigger,-1)

Thanks in advance
Jackie

Jackie
20th September 2004, 02:32 AM
whoops.....
That should read

ShortExitTrigger:= L<=(L - 0.50) of Ref( S H O R T EntryTrigger,-1)

Thanks in advance again
Jackie

David Samborsky
21st September 2004, 01:45 AM
I think you mean something like this:

ShortExitTrigger:=(L<=ref(L-0.5,-1));

Exit when todays low is less than yesterdays low minus 50 cents.

Jackie
21st September 2004, 02:49 AM
Hi David
Thanks for reply.
No thats not quiet what I mean.

The exit I want to test is something like a profit target not from the entry price but from the high or low of the candle before the trigger day.

"Exit when todays low is less than the low of the day before the trigger day minus 50 cents."
Is that possible?

Thanks
Jackie

Jose
23rd September 2004, 12:01 PM
Jackie, this is possible in MetaStock, but it involves some serious programming which is beyond my free available time.

The issue here is that the true entry bar needs to be isolated, with subsequent entry signals ignored. Once you have the entry bar, the low of the previous day minus 50c is easy, although I fail to see the value in this.

jose '-)

Jackie
27th September 2004, 05:51 AM
Jose,
I haven't given you the whole picture of what I'm trying to do.

I am trying to test my "gap theory". Where if a chart gaps up or down the stock sometimes fills the gap and works its way back to the price where it gapped from. So I need to exit at the high or low of the candle before the trigger day.

I have manually backtested a couple of charts and had good results, on the short side where it gaps up, but wanted to test the whole top 200.
This won't give me many trades but I was just looking for a different system that I can trade with my other one.

Is this to hard for Tradesim to test?
I just need the short exit trigger.
And are you saying in your reply above that I could test this with just metastock?
for example use the system tester and check individual charts?


Any help would be appreciated. Otherwise I will manually backtest it.
Jackie

Jose
27th September 2004, 06:56 AM
Jackie, what I'm saying is this:

To reference the high or low of the bar before the trigger day in MetaStock involves more *free* time than I have currently available. It involves more than a couple of lines of code, and even more time to transfer/sort out details from the client's mind to mine.

Once you have the high or low of the candle before the trigger day, you can then reference it for the exit and test in TradeSim. Don't waste any time on MetaStock's system tester.

jose '-)

David Samborsky
27th September 2004, 12:19 PM
Is this to hard for Tradesim to test?

The problem is that it is not to hard for TradeSim to test but rather it is difficult to code using the MS formula language. TradeSim can test anything that you can throw at it as long as you can code it using the MS formula language. In fact to put it all into perspective some of the most simple concepts are very difficult to program using the MS formula language. For example try coding a simple profit stop which needs to reference the entry bar as part of its coding :( You will find that there are some severe short comings regarding the MS formula language and Equis knows all about them many times over :x

Jackie
28th September 2004, 02:55 AM
Thanks for both answers Jose & David.
I'll take your advice Jose and "won't waste time on the Metastock system tester", and yes David I see what you mean.
Thanks again
Jackie