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

Reply
Old 02-20-2011, 11:52 PM   #1

Join Date: Mar 2009
Posts: 33
Ignore this user

Thanks: 20
Thanked 1 Time in 1 Post

Looking for Advice

Hello all,

I was here three weeks ago asking for help on some coding issues. A lot of you advised me to learn and read more about EasyLangage. I really appreciated your suggestions. Now I am able to program some simple strategies with EasyLanguge. I came up with a strategy that has a 91% winning rate. However the profit factor is only 1.15 and the total net profit is less than the total commission. I tested this strategy with one emini contract on a two year 1-mini data feed. Can you please review the attached performance reports and advise if this strategy is applicable? Should I find a new broker that offers lower rates? Thanks.
Attached Thumbnails
Looking for Advice-report.jpg   Looking for Advice-report2.jpg  
feng2088 is offline  
Reply With Quote
Old 02-21-2011, 07:14 AM   #2

MightyMouse's Avatar

Join Date: Jan 2008
Location: The Lumber Yard
Posts: 1,272
Ignore this user

Thanks: 59
Thanked 394 Times in 286 Posts

Re: Looking for Advice

Quote:
Originally Posted by feng2088 »
Hello all,

I was here three weeks ago asking for help on some coding issues. A lot of you advised me to learn and read more about EasyLangage. I really appreciated your suggestions. Now I am able to program some simple strategies with EasyLanguge. I came up with a strategy that has a 91% winning rate. However the profit factor is only 1.15 and the total net profit is less than the total commission. I tested this strategy with one emini contract on a two year 1-mini data feed. Can you please review the attached performance reports and advise if this strategy is applicable? Should I find a new broker that offers lower rates? Thanks.
Are you using limit orders to enter and exit?
MightyMouse is offline  
Reply With Quote
Old 02-22-2011, 02:38 PM   #3

Join Date: Oct 2010
Location: cleveland
Posts: 89
Ignore this user

Thanks: 6
Thanked 39 Times in 29 Posts

Re: Looking for Advice

you're giving a HUGE portion of your profits to pay commissions.
the current strategy doesn't seem viable to me....just an opinion.
couple of questions
1- did you 'optimize' you efs strategy for the e-mini?
2- have you looked at fewer trades with higher targets?
3- are you using an auto-trader?
peter.
peterjerome is offline  
Reply With Quote
Old 02-22-2011, 02:50 PM   #4

Join Date: Dec 2008
Location: Dallas
Posts: 5
Ignore this user

Thanks: 0
Thanked 4 Times in 3 Posts

Re: Looking for Advice

Looking at your report, one must also consider the slippage for a strategy which will generally be higher than the commissions. It is probably a good idea on any tested strategy to use a minimum of 1 tick slippage for each entry and each exit. I have seen many systems that were returning 200% annual return take a nose dive and blow the account within the first week of trading when factoring in slippage and commissions. We generally add four ticks slippage a round turn trade and $5 commission, even though most of our strategies are very short term styled trading. Most software programs allow you to set these costs in your parameters where they are automatically calculated into your summary reports.
BillyRay is offline  
Reply With Quote
The Following User Says Thank You to BillyRay For This Useful Post:
feng2088 (02-22-2011)
Old 02-22-2011, 07:51 PM   #5

Join Date: Mar 2009
Posts: 33
Ignore this user

Thanks: 20
Thanked 1 Time in 1 Post

Re: Looking for Advice

Thanks all. You are right I didn't think about slippage. I think I should use limit orders to enter and exit. Are there any reserved words I can make tradestation to buy at bid and sell at ask? And if the buy order didn't get fill in 5 second, the trade would be cancelled? Thanks
feng2088 is offline  
Reply With Quote
Old 02-22-2011, 08:45 PM   #6

Join Date: Mar 2009
Posts: 33
Ignore this user

Thanks: 20
Thanked 1 Time in 1 Post

Re: Looking for Advice

" Buy next bar at open next bar -0.25 limit " ----- would this line of codes help me get the position filled at the bid price? how long would TS wait until it cancels the excecution if the order doesn't get filled? I will be trading on a 1 min time frame. Thanks
feng2088 is offline  
Reply With Quote
Old 02-23-2011, 12:33 PM   #7

Join Date: Dec 2008
Location: Dallas
Posts: 5
Ignore this user

Thanks: 0
Thanked 4 Times in 3 Posts

Re: Looking for Advice

To help control slippage, I do use limit orders to enter positions in an attempt to achieve the best fill price possible at my anticipated price level. With that said, I do not use limit orders to exit a position when my profit objectives are reached. When it is time to exit the market, I want out and I am willing to give up a tick or two of slippage to exit my position to assure I get out. An exception to this rule is in non-liquid markets or during night sessions that are thinly traded. This slippage is calculated into my profit objectives which takes into account the number of total contracts in the position that must be liquidated. As mentioned in my earlier post, there should be a setting in system properties to add commission and slippage to your backtesting results (see image, Commission & Slippage).

When you ask about entering at the bid and ask prices, I assume you are referring to backtesting strategies. It has been a great while since I have worked with tradestation but I do know Multicharts (which we utilize as well as RightEdge) can be configured to backtest using the ask and bid prices (see image, Backtesting Ask & Bid). In a live trading environment it is of smaller concern since limit orders are requesting to be filled at your stated price or better.

As for your 5 second cancelation of orders: That may limited to the time frequency (i.e., 1,2,3—minute bars) used to generate a condition which triggers an order. There are also various ways to code an exception when using tick data that can cancel outstanding orders after a certain period. For live or simulated (demo account) trading, it could be a function of the broker API. You may also have the option to convert limit orders into market orders after a certain length of time (see image, Convert Orders).

Your example of a buy order depends on your objective. Are you wanting to get filled at a certain price, or are you wanting to simulate the cost of trading into your strategy (which may be accomplished as described above). Also, depending on trading objectives (and your setting, environment, data frequency) you may wish to enter an order before the completion of the one minute bar once a signal is triggered. This may be accomplished by enabling Intra-Bar Order Generation (see image, Intra-Bar Order Generation) which may also be coded directly into the script (i.e., [IntrabarOrderGeneration = True]).

If you are actually needing to enter the order one tick below the next bar’s opening price of say, ES for instance: Buy 1 contract Next Bar (Open - .25) Limit ; However, the problem with this type of order (as is characteristic in limit orders) is you can be right about anticipated price direction and not profit from being right simply because prices never retrace to your limit price. I use limit orders when I am expecting a retracement of prices to a certain level prior to heading in my desired direction.

There are always trade-offs and what works for me may not work for you or anyone else. Reminds me of the saying that we don’t trade the markets, we trade our beliefs. Hope this helps.
Attached Thumbnails
Looking for Advice-commission-slippage.png   Looking for Advice-backtesting-ask-bid.png   Looking for Advice-convert-orders.png   Looking for Advice-intra-bar-order-generation.png  
BillyRay is offline  
Reply With Quote
The Following User Says Thank You to BillyRay For This Useful Post:
feng2088 (02-23-2011)
Old 02-23-2011, 10:38 PM   #8

Join Date: Mar 2009
Posts: 33
Ignore this user

Thanks: 20
Thanked 1 Time in 1 Post

Re: Looking for Advice

Thank you much for your post, Billy! I modified my codes and now for both buy and sell I use limit orders (see below). I want $0 slippage always. You mentioned that if I used -0.25 limit, my order may not be filled, That is ok since I will be trading on the 25 ticks time frame. I don't mind missing those opportunities. I am not ready to go live yet as I am not sure if i miss anything here. I attached couple screenshots of my strategy performance and settings . The return seems good when I backtest it, but would I see a big discrepancy if I go life? Thanks

Code:
Buy next bar at open next bar -0.25 limit ; 

If Positionprofit > x amount then 

Sell next bar at Positionprofit limit;
Attached Thumbnails
Looking for Advice-performance-1.jpg   Looking for Advice-performance-2.jpg   Looking for Advice-strategy-setting-1.jpg   Looking for Advice-strategy-setting-2.jpg   Looking for Advice-strategy-setting-3.jpg  

feng2088 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
Some Advice for Newbies JohnnySDG Beginners Forum 47 08-12-2011 04:26 AM
Indicator Advice dazman E-mini Futures Trading Laboratory 14 05-18-2009 03:59 AM
Advice matinthehat Beginners Forum 18 10-10-2008 11:23 AM
Fed Day Advice. Nvesta81 Beginners Forum 18 06-27-2008 01:53 PM
Need Advice cmc Beginners Forum 6 02-12-2008 07:28 AM

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