Autotrading Slippage compared to Replay - NinjaTrader | futures io social day trading
futures io futures trading


Autotrading Slippage compared to Replay
Updated: Views / Replies:4,345 / 15
Created: by TheGaryGuy Attachments:3

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 3  
 
Thread Tools Search this Thread
 

Autotrading Slippage compared to Replay

  #1 (permalink)
Elite Member
Bellevue, WA/USA
 
Futures Experience: Advanced
Platform: NinjaTrader, TOS, TDAmeritrade, Dough.com
Broker/Data: ThinkOrSwim, Dough.com, TDAmeritrade, Interactive Brokers (soon)
Favorite Futures: Index and Stock options, Stocks (seldom), Nadex (just starting), Forex
 
Posts: 27 since Oct 2012
Thanks: 36 given, 17 received

Autotrading Slippage compared to Replay

I have been building CL strategies for NinjaTrader for the last couple months and have some that perform well in SIM and replay. BUT when I ran with real, live, (MONEY) on friday, my strategies failed. Some of that loss was due to a "Another day of Churn". but at least 50% of the losses were due to auto-trading fills being -2 ticks on the entry and -7 ticks on the exit.

Has anyone else had this problem autotrading with NinjaTrader? And if so, how did you fix this problem?

Note: I am trading off the Renko charts (of various brick sizes).

thanks, Gary

Reply With Quote
The following user says Thank You to TheGaryGuy for this post:
 
  #2 (permalink)
Elite Member
Manchester, NH
 
Futures Experience: Beginner
Platform: thinkorswim
Broker/Data: TD Ameritrade
Favorite Futures: Stocks
 
Posts: 902 since Jul 2012
Thanks: 603 given, 1,785 received

If you're comfortable with sharing: what order sizes/time frames/average holding periods are these? If the holding periods are short, just aggressively taking market orders is going to kill nearly any strategy. If the order sizes are a significant fraction of the average volume in the time scale (of the chart) that you are executing on, then market impact costs are going to outweigh all other slippage factors. To sum it up, the solution is that "It is nice to buy at the bid and sell at the ask." I think this is fundamental, but says nothing much you can do besides improve the strategy itself to remain profitable after taking into consideration the slippage.

There are a variety of ways you can improve things *slightly*. There are ways to reduce market impact (I think Johnson's DMA book has introductory bits on this). Otherwise, you can try provide liquidity on at least one side of the trade, at your desired price. You can find ways to determine an interval about the last price where you are confident that your limit will be filled. The overall profitability of the strategy will decrease because of lost opportunity cost, but this is unavoidable; you will encounter situations where you had the right signal but didn't get the fill and missed the price action. But this beats taking suicide market orders that are doomed to start with a 7 tick loss only to aim for a fraction of that as average gain.

I'm also presuming that the signal(s), minus the slippage, still possess the same edge as in your backtests, and so are not curve-fitted now that you have taken it live and out-of-sample. In that case, at least now you have an estimation of the slippages including the market impact cost to factor into your backtests. (It's harder to estimate the market impact cost than the execution cost from the bid-ask spread or latency.)

Reply With Quote
The following 3 users say Thank You to artemiso for this post:
 
  #3 (permalink)
Elite Member
Bellevue, WA/USA
 
Futures Experience: Advanced
Platform: NinjaTrader, TOS, TDAmeritrade, Dough.com
Broker/Data: ThinkOrSwim, Dough.com, TDAmeritrade, Interactive Brokers (soon)
Favorite Futures: Index and Stock options, Stocks (seldom), Nadex (just starting), Forex
 
Posts: 27 since Oct 2012
Thanks: 36 given, 17 received


Artemiso, thank you for your rapid response. I am trading a single contract (due to this being a test strategy and first time auto-trading NinjaTrader) I am using a 6 Renko chart (6 ticks per brick or $60/bar on CL) and holding periods during normal trading hours for this strategy are 11.2 minutes (on Friday morning).

Because of the way that Renko bars are created, there is normally a lot of swing up and down above and below the closing price of the trigger bar before the next bar is formed. So with this in mind I tried to put in a limit order at the close of the trigger bar but that strategy did not work well. (even when I turned off Calculate at end of bar).

The strategies as they stood before Fridays live test were making around $50/trade on average, less than 50% were winning but winners were around 5 times the size of loosers. With a loss in slippage of around $90 per trade.. it could drain the account in a hurry (for a strategy I thought would be a winner).

Thanks for your help,
Gary

Reply With Quote
The following user says Thank You to TheGaryGuy for this post:
 
  #4 (permalink)
Identify Evaluate Execute
Mercer Island WA
 
Futures Experience: Advanced
Platform: Ninjatrader/Strategy Desk
Broker/Data: Various
Favorite Futures: TF/NQ/ES/Stocks
 
djkiwi's Avatar
 
Posts: 561 since May 2010
Thanks: 980 given, 1,524 received


TheGaryGuy View Post
I have been building CL strategies for NinjaTrader for the last couple months and have some that perform well in SIM and replay. BUT when I ran with real, live, (MONEY) on friday, my strategies failed. Some of that loss was due to a "Another day of Churn". but at least 50% of the losses were due to auto-trading fills being -2 ticks on the entry and -7 ticks on the exit.

Has anyone else had this problem autotrading with NinjaTrader? And if so, how did you fix this problem?

Note: I am trading off the Renko charts (of various brick sizes).

thanks, Gary

Gary, unfortunately if you continue with this approach the odds are so mathematically stacked against you, you will lose all or nearly all of your money. I would seriously consider a temporary halt to this approach. Here is an extract from my financial trading plan (some numbers changed for confidentiality reasons) which illustrates some of the challenges (will explain this in more detail in a new thread at some point).

1. Financial Trading Plan - Scenario 1

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Basically this scenario assumes you are trading CL using market orders on entries and exits. You place 1 trade per day over 200 days (ambitious) with 2 targets and 2 contracts per target. You have a 10 tick 1st target, 20 tick second target with a 10 tick stop.

Your probability of achieving the first target is 60% ad 35% the second target. Your slippage is 2 ticks but as you pointed out can be higher particularly in the 1st 30 minutes of trading.

Now look at cell F49 which shows the direct costs of slippage and commission is a massive 32%. This is equivalent of playing roulette with 11 zeros on the roulette wheel.

Even though this scenario is slightly profitable $3200 the sensitivity to loss is high. All you need is a slight drop in the winning % of 60% on the first target and the profit is toast.

2. Financial Trading Plan - Scenario 2

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Scenario 2 assumes you place limit orders on entries and market orders on exits. You continue to place 1 trade per day with 2 targets and 2 contracts per target, same as scenario 1. The big difference is your targets are larger. Target 1 is now 30 ticks, target 2 is 60 ticks and the stop is 30 ticks.

Your probability of achieving the first target stays at 60% ad 35% the second target. Your slippage is still 2 ticks. Now look at cell F49 which shows the direct costs of slippage and commission is only 7%. This is equivalent of playing roulette with 2.5 zeros on the roulette wheel which is about house odds.

This scenario is much more profitable at $49,600 and the sensitivity to loss is lower. A slight drop in the winning % of 60% on the first target will continue to yield a profit.

3. Summary

-Use limit orders on entries and market orders on stops
-Use a minimum of 30 tick targets and stops. Based on extensive financial modeling the target quantum has the biggest impact on profitability. My research suggests the probability of retail traders trading profitably over the -long term with targets less than scenario 2 are slim to none. Bear in mind the ATR for oil for each 30 minute period which is another reason for using increased targets and stops on oil. You can see in the table below oil ATR for each 30 minute period. For example in the 1st 30 minutes it's 64 cents and then 71 cent average move over the next 30 minutes. This important volatility analysis is a critical actor when I'm trading different instruments.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Cheers
DJ


Last edited by djkiwi; October 15th, 2012 at 05:51 AM.
Reply With Quote
 
  #5 (permalink)
Elite Member
Bellevue, WA/USA
 
Futures Experience: Advanced
Platform: NinjaTrader, TOS, TDAmeritrade, Dough.com
Broker/Data: ThinkOrSwim, Dough.com, TDAmeritrade, Interactive Brokers (soon)
Favorite Futures: Index and Stock options, Stocks (seldom), Nadex (just starting), Forex
 
Posts: 27 since Oct 2012
Thanks: 36 given, 17 received

DJ, Thank you for your response to my question.

First, please assume I do know some risk management, and will not trade my account into the hole.

I can tell by your response and great spreadsheets, you have done a lot of evaluation on the potential losses and gains from your strategies.

I must also tell you that my goal is to create a strategy (or several) that day-trade a single contract to a healthy profit each day. I have several reasons for this but they are not important at this time. I also have programmed exits from my trades and do not use a standard stop loss or target. So we have very different philosophy and trading styles. This is ok.

I do like your "odds of winning" and your 30 stop, 30 first target and 60 second target concepts, but I have not found high probabilities in asking the market to give me even a reliable 30 ticks from any trade opening. Perhaps your entry and exit criteria are well worked out and give you this expectancy, but remember my strategy is a work in progress, and my first attempt at "auto-trading".

Yes, my Friday strategy was using market orders for both entries and exits.. and got excellent fills in replay, but terrible fills in live trading. I did try using limit orders in replay, and very similar results to the previous replay results. I will try limit orders for entry it in the sim later today.

Reply With Quote
The following 2 users say Thank You to TheGaryGuy for this post:
 
  #6 (permalink)
Elite Member
@ Germany
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: FDAX
 
Posts: 440 since Nov 2011
Thanks: 254 given, 369 received


Quoting 
I will try limit orders for entry it in the sim later today

Regarding to your strategy (with trend, countertrend) there are higher or lower execution risks. Your strategy eliminates risk due to market impact to zero - so we don't bother with that issue. You are an advanced trader so i don't want to spam you, but you can't test or evaluate execution risk in SIM mode. In NT you have settled values for slippage. I think it would be much more meaningful if you run your limit order tests on an real account.

Reply With Quote
The following 2 users say Thank You to Koepisch for this post:
 
  #7 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,351 given, 83,221 received


TheGaryGuy View Post
losses were due to auto-trading fills being -2 ticks on the entry and -7 ticks on the exit.

Note: I am trading off the Renko charts (of various brick sizes).

Renko bars have false opens and cannot be backtested without using a secondary dataseries like a 1-range or 1-tick for execution. This is also probably why your strategy shows a profit, because of the false open. If the same strategy does not show a profit on a range bar, it's a clue the strategy is not profitable.

Switch to a range bar and you should see a high degree of matching between backtesting/sim and live.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following 5 users say Thank You to Big Mike for this post:
 
  #8 (permalink)
Elite Member
Bellevue, WA/USA
 
Futures Experience: Advanced
Platform: NinjaTrader, TOS, TDAmeritrade, Dough.com
Broker/Data: ThinkOrSwim, Dough.com, TDAmeritrade, Interactive Brokers (soon)
Favorite Futures: Index and Stock options, Stocks (seldom), Nadex (just starting), Forex
 
Posts: 27 since Oct 2012
Thanks: 36 given, 17 received

Mike,

Thank you so much for your input.

I have noticed that as a new Renko bar is built the price can swing up just under 1 brick above the current bar to
just under 1 brick to the downside before it goes that extra tick and the candle is formed. So the open of the
candle happens at that time.

So while there is a 2 tick loss (similar to bid ask spread) on the open, I can happily accept 2 ticks (cost of doing
business) on entry.

However the 7 tick loss on close is confusing to me (and not acceptable). Why would market orders be 5 ticks
different on the opening of a short or long trade from the close market order?

By the way, I do find the strategy works fine with a smaller percentage slippage as I increase the brick size.
The number of trades goes down as well as the profit. and the size of max loss with this strategy increases too.
Once again a work in progress and still working.

In any case.. the biggest benefit of Renko bars (like HeikenAshi) is to make an incoherent market look coherent.
It makes it much easier to see trends, support and resistance, and patterns of price movement.
Strategies that use this information can be modified to successful time based strategies on any time period chart.

Thanks again for your great input and help,

Sincerely, Gary

Reply With Quote
The following user says Thank You to TheGaryGuy for this post:
 
  #9 (permalink)
Elite Member
Bellevue, WA/USA
 
Futures Experience: Advanced
Platform: NinjaTrader, TOS, TDAmeritrade, Dough.com
Broker/Data: ThinkOrSwim, Dough.com, TDAmeritrade, Interactive Brokers (soon)
Favorite Futures: Index and Stock options, Stocks (seldom), Nadex (just starting), Forex
 
Posts: 27 since Oct 2012
Thanks: 36 given, 17 received

Finally Understanding the bad Renko fills

Hi Guys,

Thank you all for your posts on this topic. With your responses and a lot more study of charts and experiments I finally understand what is happening when trying to auto trade Renko charts.

When a Renko brick is formed the price must move 1 tick beyond the brick size, up or down from the open or close of the previous brick. Using a 6 tick Renko as an example
1. We just formed a red brick. Price is currently 1 tick below that close (bottom of candle)
2. Price rises to Open of red candle +7 ticks and we get a green candle.

When using historical backtesting with Ninja Trader, the backtest will show the entry into a trade at the open of the next brick. If the next brick is RED it will be pretty accurate. If the next brick is GREEN it will be WRONG as the open of the GREEN candle is 7 ticks above the close of the RED brick.

So, backtesting results will not match with either sim or replay due to this difference between Renko charts and normal candles or bar charts who's opens are normally equal or close to the close of the previous candle.

Summary: To be able to use Renko charts for auto trading it is best to avoid the larger brick sizes AND be ready to give up the brick size +1 tick on a triggered exit (if using calculate on bar close). So it is possible to build a auto trading Renko system but it is not as easy to verify with backtesting on the current version of Ninja Trader.

Thanks for all your input and help.

Gary

Reply With Quote
 
  #10 (permalink)
Identify Evaluate Execute
Mercer Island WA
 
Futures Experience: Advanced
Platform: Ninjatrader/Strategy Desk
Broker/Data: Various
Favorite Futures: TF/NQ/ES/Stocks
 
djkiwi's Avatar
 
Posts: 561 since May 2010
Thanks: 980 given, 1,524 received

Better Renko


Gary, yes that is true on Renko bars. Have you tried Better Renko bars? I've been using Better Renko for a few years now without the issues of the stock Renko.

Here is a note from Mike who has a ton of experience backtesting/forward testing these bars

https://futures.io/elite-automated-trading/18596-renko-systems-7.html#post276335

Cheers
DJ

Reply With Quote
The following 2 users say Thank You to djkiwi for this post:

Reply



futures io > > > > Autotrading Slippage compared to Replay

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Autotrading using Multicharts ? buylosellhi MultiCharts 7 December 5th, 2012 01:48 PM
Today's Economic Data Docket - Or Largely Irrelevant Stuff Compared To Headlines Out Quick Summary News and Current Events 0 November 16th, 2011 09:00 AM
autotrading the eminishark journal sysot1t Trading Journals 31 July 12th, 2011 12:03 PM
Better indicator compared to RSqueez for pointing the Divergences dellcnu The Elite Circle 5 May 31st, 2011 07:33 PM
How Much Will You Owe? Tax Plans Compared Quick Summary News and Current Events 0 September 18th, 2010 03:00 PM


All times are GMT -4. The time now is 01:15 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-13 in 0.17 seconds with 20 queries on phoenix via your IP 54.82.79.109