Do's n Dont's for realtime-trading - Traders Hideout | futures io social day trading
futures io futures trading


Do's n Dont's for realtime-trading
Updated: Views / Replies:1,885 / 6
Created: by DarthTrader Attachments:0

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
 
Thread Tools Search this Thread
 

Do's n Dont's for realtime-trading

  #1 (permalink)
Elite Member
Cologne
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Mirus/Zen-Fire, Velocity/TT
Favorite Futures: Futures, Stocks
 
Posts: 10 since Jun 2009
Thanks: 29 given, 2 received

Do's n Dont's for realtime-trading

Hi,

yesterday, after handling with a OCO-problem, I asked myself what are the differences in programming if I want to go live with a strategy.

During backtesting only at the open of a new bar orders are triggered, so I think there is a little difference and maybe you have to change your code for live-trading.

Because I'm not new to programming but to NinjaTrader I wanted to know what are your experiences or best-practices and what are the changes in code to go live with the strategy. Error-Handling is also an interesting point ...

Thx in advance
DT

Reply With Quote
 
  #2 (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,238 since Jun 2009
Thanks: 29,350 given, 83,218 received

Hi DT,

There is a lot to cover on this subject, but some advice I hope you take to heart is this:

Always test your strategy in simulation mode in a live market before allowing cash trades.

I have learned too many times that something did not behave as expected, but only after I started placing live trades. These things did not show up in Market Replay and especially did not show up in backtesting.

Some examples I can think of:
  1. One strategy that focuses on longs, a separate on shorts, each trying to open or close a position. [only if you have two separate strategies on same instrument]
  2. Stop orders - in general.
  3. Limit orders - in general.
Hopefully some others will chime in as well. There is a LOT to cover on this topic

Mike

Reply With Quote
The following user says Thank You to Big Mike for this post:
 
  #3 (permalink)
Elite Member
Cologne
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Mirus/Zen-Fire, Velocity/TT
Favorite Futures: Futures, Stocks
 
Posts: 10 since Jun 2009
Thanks: 29 given, 2 received


Thanks Mike, for your fast reply.

Could you explain it in more detail. I would prefer some code-snippets

Do you use only Market-Orders in Strategies, when you say there could be a problem with stops and limits?

From my point of view I used in other tools such things like:
  • check trading-hours
  • check price and order-server availability
  • check CurrentBar > XY
  • check current position of the strategy
  • ...
Maybe it could be the target of this thread to produce a template for strategies, with code-snippets to start live-trading, multiple comments included ... to prevent errors in live-trading ...

DT

Reply With Quote
 
  #4 (permalink)
Elite Member
Toronto, CA
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: IB
Favorite Futures: YM, ES
 
record100's Avatar
 
Posts: 105 since Jun 2009
Thanks: 34 given, 42 received

there are standard NT approaches that are recommended to do using methods onbarupdate, onorderupdate, onorederexecution, onpositionupdate, again we might need to wait for NT7 for better order processing control. That control could depend on data provider.

Reply With Quote
 
  #5 (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,238 since Jun 2009
Thanks: 29,350 given, 83,218 received


DarthTrader View Post
Do you use only Market-Orders in Strategies, when you say there could be a problem with stops and limits?

These problems are really not easy to explain, but basically...

I only use market orders in strategies anymore. This is because limit orders have several problems with backtests.

Everything I say below is assuming BACKTESTING not live trading:

First, if at any time on a bar your limit price is hit, it will be filled. Let's say you have a 5m bar or some other bar which can be large. Say your target is 4 ticks. Price can be at the top of the bar and falling, fill your LONG limit order, and then close on the low without ever going +1 tick after filling you, yet Ninja will show a profitable trade if there was 4 ticks between the bar open and your limit price. Ninja doesn't know the OHLC order, I get that.

Second, you try to set your profit target to not ever fill on bar #1. At least 2 bars are required. This plays it 'safe'. If you call SetProfitTarget after BarsSinceEntry() > 1, it will still show profit target on bar 1, even though it was called on bar 2 and during bar 1 no PT even existed.

Third, if you name your orders the same (ie "long" and "short") and you set your profit targets in #onbarupdate say right after the Enter() command, many times NT has the wrong PT values because it was left-over from a previous signal. If a signal 5 entries ago had a target of 4 ticks, NT screws up and doesn't always recalculate the new PT based on the new entry.

Needless to say, I wrote a lot of code that fixes all of these -- to the best of my knowledge -- but still I just prefer to deal with market orders in strategies given all my negative experience with limit orders.

Stop orders are just as bad. A stop limit order is twice the fun. The stop price can be met, the limit price never hit after the stop order was placed, yet ninja will show it filled, again all because OHLC order is unknown.

I do not know why NT cannot simply assume the worst OHLC order. Would be nice. Or it would be nice to have a menu option to never allow PT on bar #1 as well.

Anyway, that is as quick as I can make it.

Mike

Reply With Quote
The following 4 users say Thank You to Big Mike for this post:
 
  #6 (permalink)
Member
Chicago
 
Futures Experience: Advanced
Platform: X_Trader, Ninja
Broker/Data: Advantage/TT and Mirus/ZenFire
Favorite Futures: ES
 
Posts: 60 since Jun 2009
Thanks: 0 given, 16 received

Always use the market data replay to backtest strategies... using the built in backtester is for all intents and purposes... worthless...

market replay will let you get a real flavor of what you migh or might not see

Reply With Quote
 
  #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,238 since Jun 2009
Thanks: 29,350 given, 83,218 received


BigDog View Post
Always use the market data replay to backtest strategies... using the built in backtester is for all intents and purposes... worthless...

market replay will let you get a real flavor of what you migh or might not see

Not practical when trying to test 1 year of data. Hell, not practical when trying to test more than a couple weeks.

But all of this backtest talk is steering me off course. I am really trying to stay away. I spent over a year on this stuff and have nothing to show for it, with the exception of identifying tons of bugs. I am not getting paid by NT so that is worthless.

My focus is 100% discretionary. Backtesting is just useful to me in the idea of proving an approximate concept is approximately profitable.

Mike

Reply With Quote

Reply



futures io > > > Do's n Dont's for realtime-trading

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
indicator realtime updating johni MultiCharts 2 July 15th, 2011 05:45 AM
Moving Data between realtime indicators tinkerz NinjaTrader 3 May 22nd, 2011 06:53 AM
SP Bovespa realtime? azbarroso Traders Hideout 4 February 1st, 2011 07:36 AM
PC optimization for Realtime trading tinkerz Traders Hideout 4 October 21st, 2010 07:52 AM
RealTime Trading PC spec tinkerz NinjaTrader Programming 14 May 16th, 2010 09:33 AM


All times are GMT -4. The time now is 12:47 AM.

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-11 in 0.12 seconds with 19 queries on phoenix via your IP 107.20.115.174