Welcome to the Traders Laboratory Forums.
Automated Trading Black box systems, strategy automation, algorithmic trading, etc...

Reply
Old 10-15-2008, 02:50 PM   #1

Join Date: Oct 2008
Posts: 7
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

EasyLanguage Back Testing

I've got a couple of decent EasyLanguage strategies working now - thanks for the help guys - but I find if I set my stop and trailing stop very very small (like a few dollars), then back testing gives me extremely good results, which doesn't seem likely.

I'm guessing this is just a back testing "feature"? Does back testing work on a small proportion of the ticks that really occur? I'm also thinking in a real environment my stops might not get filled at the price I'm asking for, but they always seem to during back testing...


Can anyone recommend a decent book, or pdf that covers EasyLanguage and back testing etc in tradestation?


Thanks,

David.
mctaff is offline  
Reply With Quote
Old 10-20-2008, 07:57 AM   #2

Join Date: May 2007
Location: Toronto
Posts: 264
Ignore this user

Thanks: 9
Thanked 153 Times in 56 Posts

Re: EasyLanguage Back Testing

The best resource is the TS Forum and Community. Plus you can get all the TS EasyLanguage reference books at https://www.tradestation.com/support/books/default.aspx

With respect to your backtesting... do not trust any results which give you profits within the same bar as you are trading. The assumptions TS makes about which came first ... the OHLC or the OLHC, while reasonable - do not provide accurate backtesting results for scalping conditions.

To get around some of the problem, set Look Inside Backtesting Bar (LIBB) to a short time interval like 1 minute which gives the backtesting engine more information about how the data came into the bar. You can go down to the 1 tick level , which provides exact results but is very slow for any longer term testing, and is only available for 6 months of back testing data.

In my experience - although at first I strongly resisted this - you are better off trading on longer time frame charts and having larger targets and stops with fewer trades per day.

Good luck with your strategies.

I now greatly prefer automated trading (of many markets simultaneously) to the task of trying to enter on a discretionary basis for a short term gain.
bakrob99 is offline  
Reply With Quote
Old 10-20-2008, 03:07 PM   #3

Join Date: Oct 2008
Posts: 7
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Re: EasyLanguage Back Testing

Thanks - I figured out the tick testing thing the other day.

Strategy still doing very well on back testing, but having difficulties forward testing, as stop loss orders are being rejected 'cause the market sometimes moves too quickly. Is there any way to put the stop in place at the same time as the order, so they don't get rejected?
mctaff is offline  
Reply With Quote
Old 10-20-2008, 04:33 PM   #4

Join Date: May 2007
Location: Toronto
Posts: 264
Ignore this user

Thanks: 9
Thanked 153 Times in 56 Posts

Re: EasyLanguage Back Testing

Absolutely - I use the following:

SetStopContract;
SetStopLoss(nStop);


then if I want to move the stop after I get a gain in the trade I use:


If GrossMFETicks > MoveStopAfterTicks then
SetStopLoss(MoveStopToTic ks * BigPointValue *minmove/pricescale);

NOTE: DO NOT PUT THE FIRST SetStopLoss IN A CONDITION. IT MUST BE SENT EVERY TICK EVEN IF YOU ARE NOT YET IN A TRADE.
bakrob99 is offline  
Reply With Quote
Old 10-20-2008, 04:41 PM   #5

Join Date: Oct 2008
Posts: 7
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Re: EasyLanguage Back Testing

Yeah I've been using setStopLoss, but because the stops are tight - 8 pips - sometimes they get rejected by the system. I think it's because the price has moved the 8 pips whilst the initial order is being processed.

I'm trying to figure a way the stop gets set as the order is processed, so it doesn't get rejected...

I'm unsure how to either set the stop with the order, so it doesn't get rejected... or catch a rejected stop and resubmit a few pips higher to make sure it happens
mctaff is offline  
Reply With Quote
Old 10-21-2008, 12:17 PM   #6
zdo

Join Date: Nov 2007
Location: boonies
Posts: 1,349
Ignore this user

Thanks: 317
Thanked 355 Times in 256 Posts
Blog Entries: 104

Re: EasyLanguage Back Testing

After a few months of banging head against the same type of issues, did a major re-write of everything to do market orders only in TS automation - no limit orders no stop orders - entry or exit.
The next, (quite enjoyable, btw) challenge was to engineer enough 'positive' slippage (loose with terminology) to compensate for new slippage issues that arose with market orders.
hth
zdo is offline  
Reply With Quote
Old 10-22-2008, 06:20 AM   #7

Join Date: May 2007
Location: Toronto
Posts: 264
Ignore this user

Thanks: 9
Thanked 153 Times in 56 Posts

Re: EasyLanguage Back Testing

Quote:
Originally Posted by mctaff »
Yeah I've been using setStopLoss, but because the stops are tight - 8 pips - sometimes they get rejected by the system. I think it's because the price has moved the 8 pips whilst the initial order is being processed.

I'm trying to figure a way the stop gets set as the order is processed, so it doesn't get rejected...

I'm unsure how to either set the stop with the order, so it doesn't get rejected... or catch a rejected stop and resubmit a few pips higher to make sure it happens
Have you considered the obvious - that perhaps the stop is too tight?
bakrob99 is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Back Testing Intra-day Trades... Nvesta81 Beginners Forum 12 04-28-2008 08:37 AM
testing August lows ryounkin The Candlestick Corner 4 12-01-2007 10:08 AM
newbie's question:back testing? jim bin Beginners Forum 5 08-05-2007 10:48 AM
Testing trade Ramzes Beginners Forum 5 11-01-2006 04:52 PM
One theory I am testing out Soultrader Market Profile 6 09-28-2006 01:26 AM

All times are GMT -4. The time now is 09:27 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.