Un-attended trading - NinjaTrader Programming | futures io social day trading
futures io futures trading


Un-attended trading
Updated: Views / Replies:3,590 / 20
Created: by drolles 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
 

Un-attended trading

  #11 (permalink)
Elite Member
London, UK
 
Futures Experience: Beginner
Platform: TradeLink, OpenQuant, considering anything that works...
Favorite Futures: if it trades...
 
Posts: 94 since Oct 2010
Thanks: 24 given, 38 received


Adamus View Post
Big question. Hope you're still interested - better late than never though.

I assume you are talking about strategies using the NinjaTrader 'managed orders' approach, rather than scripting everything yourself with the unmanaged approach.

In my experience over the previous half year or so, with 10 trades a day roughly, I've only had 2 problems with NinjaTrader screwing up the strategies and as it turns out, I could have ignored the problem and it would have been OK, but my error checking on the IOrder objects my strategies holds told me there was something wrong and therefore they shut themselves down (as I intended when I scripted it).

That was due to the early morning circa 4:30AM GMT+0 Interactive Brokers routine disconnects, as I told you about before I think.

I checked out the NinjaTrader built-in functionality for disconnects and found this:

I assume this means that NT will submit any orders delayed by connection loss. Or am I assuming too much?

Adamus,

I think we discussed this previously but I thought it best to follow-up here as well; I think you are assuming too much. I donít think there is any caching of order by NT. I think you have to manually manage this using OnConnection(). However, as we discussed Iím only stepping off using this functionality.


You might want to pose exactly the question on the NT support forum.


Kind regards,

drolles

Reply With Quote
 
  #12 (permalink)
Elite Member
London, UK
 
Futures Experience: Beginner
Platform: TradeLink, OpenQuant, considering anything that works...
Favorite Futures: if it trades...
 
Posts: 94 since Oct 2010
Thanks: 24 given, 38 received


MXASJ View Post
drolles if you have not already seen it take a look here:

https://futures.io/elite-circle/7839-systemmonitor-remote-servers.html

It is in the Elite section so I won't post the code here. Basically you might consider all the things that might go wrong, and code for each of them seperately. You also need to think about what is "global" and what is strategy-specific. Disconnects, for example, might be considered a global problem that can be managed by a seperate strategy.

The biggest problem I've come across is placing limit orders too close to the market. BuyLimit/SellLimit orders on the wrong side of the market will result in a rejection and stratgey shutdown as you have seen.

I have not (yet) migrated to unmanaged orders but that is a next step for me.

MXASJ,

Thanks very much for posting that and the link to your monitor strategy Ė really clever idea. I can see where you are going with that. I like the idea that you are checking a number of items in the strategy. However, I not really had any problems with connection reporting. NT lets me know when a connection is dropped. Iím more worried about the other items, i.e. order placement as you acknowledge we have both seen strategies shut down due to order placement.

One of the other key problems you have identified in your monitor strategy is the management of a daily lower lost limit. I generally incorporate this as part of a strategy given it will impact the PnL distribution of the strategy I think it should be modelled as a strategy development process.

Thanks again for adding some views to the thread.

Kind regards,

drolles

Reply With Quote
 
  #13 (permalink)
Elite Member
London, UK
 
Futures Experience: Beginner
Platform: TradeLink, OpenQuant, considering anything that works...
Favorite Futures: if it trades...
 
Posts: 94 since Oct 2010
Thanks: 24 given, 38 received

managed approach


All,

I was thinking of using the managed approach here. I think with the update on the order rules with the update to NT7, we are in a much better position than we were under NT6.5.

Cheers,

drolles


Last edited by drolles; March 22nd, 2011 at 07:21 AM. Reason: wrong text
Reply With Quote
 
  #14 (permalink)
Elite Member
London, UK
 
Futures Experience: Beginner
Platform: TradeLink, OpenQuant, considering anything that works...
Favorite Futures: if it trades...
 
Posts: 94 since Oct 2010
Thanks: 24 given, 38 received


RM99 View Post
The only real option I've seen in EL is the use of macros.

Sorry RM99, what do you mean by EL here?


RM99 View Post
Macros incorporate the coding that's already in the proprietary matrix. Why the brokers/platforms don't incorporate or release it, is beyond me. It's just dumb and a real pain in the rear.

By Macros I'm assuming that you mean Windows macros?


RM99 View Post
I've actually hired a consultant to help with the order rejection on limit orders and I have a viable solution, although it's virtually no different than using a market order. (essentially, you incorporate a pricegap into your order so if you wish to buy at 1.00, then it places the order at 1.00 plus whatever gap you specify .01, .02, .03, etc....which in the end, is the same as experiencing market order slippage.

Obviously, I’m not fully aware of the particulars of your implementation but I would have made the placement of order completely dynamic dependent on the Bid/Ask spread. I understand that might be what you are saying – sorry if it is. This is one area I want to improve. However, my main concern is getting the test cases right. By that I mean access to proper tick data to test the functionality of the script around handling the very dynamic nature of tick data.



RM99 View Post
Even if you get past the dangers in ping lag and having limit orders jumped, the next and bigger issue is partial orders.

This is why I suggest that for now manage approach is best. NT7 is meant to take care of those. Is that not your experience? I think partial fills and unfilled orders requires some serious management. And I think the decisions you take depend on what one is trying to achieve with the strategy.


RM99 View Post
The second issue I'd like to address is dedicated server. DO NOT use a VPS. VPS are partitioned...so you are on the server with others, who have surges in consumption, issues with their partition that warrant restarts, etc.

Fair point, however, what I was trying to do with this thread was gather options on making NT more robust assuming a robust operating environment. Is it ok if we keep physical / logical architectures out of scope of this thread?


RM99 View Post
...more like cruise control than auto pilot.

I like the analogy, nice one. I do hope that with some brain storming with the NT users / developers on futures.io (formerly BMT) we can make it more of an auto pilot than a cruise control as a group.


RM99 View Post
... you'll have a system where you might be able to have your smart phone on you...

Again, I would suggest slightly off topic, but now you have brought it up, you might want to check out: https://secure.logmein.com/welcome/ios/?wt.ac=IgnitionBuyFiles

Thanks again for the post and thoughts.

Kind regards,

Drolles


Last edited by drolles; March 22nd, 2011 at 09:43 AM. Reason: clearify thoughts on Bid / Ask spread testing.
Reply With Quote
 
  #15 (permalink)
Elite Member
Atkinson, NH USA
 
Futures Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker/Data: NinjaTrader Brokerage
Favorite Futures: Futures, CL, ES, ZB
 
NJAMC's Avatar
 
Posts: 1,925 since Dec 2010
Thanks: 2,962 given, 2,294 received


MXASJ View Post
The biggest problem I've come across is placing limit orders too close to the market. BuyLimit/SellLimit orders on the wrong side of the market will result in a rejection and stratgey shutdown as you have seen.

I have not (yet) migrated to unmanaged orders but that is a next step for me.

I am having the same problem. I am using unmanaged and TD-Ameritrade to connect. I can't figure out how to catch the error coming back from TDA and continue the script. If I miss due to fast market or slow transfer of the order, I just want it to ignore the error as another order will be along shortly when the conditions are next detected as different.

Currently not a Elite member, it would be nice to see what is there somehow to determine the ROI of the investment...

Reply With Quote
 
  #16 (permalink)
Elite Member
London, UK
 
Futures Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker/Data: IB/IQFeed
Favorite Futures: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 470 given, 778 received


drolles View Post
Adamus,

I think we discussed this previously but I thought it best to follow-up here as well; I think you are assuming too much. I donít think there is any caching of order by NT. I think you have to manually manage this using OnConnection(). However, as we discussed Iím only stepping off using this functionality.


You might want to pose exactly the question on the NT support forum.


Kind regards,

drolles

They say orders are submitted on reconnection.

Account Sync/Recalculate/Immediately Submit - NinjaTrader Support Forum

You can discover what your enemy fears most by observing the means he uses to frighten you.
Reply With Quote
 
  #17 (permalink)
Elite Member
London, UK
 
Futures Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker/Data: IB/IQFeed
Favorite Futures: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 470 given, 778 received

Just steer clear of NT7's recalculate in my opinion

While searching the NT forum for posts about the Recalculate option on strategies, I came across this little gem where I had actually posted to the thread - nothing useful, just more NT ambiguity:

NT support forum

The reason I was searching is that I unwisely switched on Recalculate on my live systems. I don't know what I was thinking - I should do experiments like that on Sim first - I am so stupid.

So now I have 2 unplanned positions to exit from - both at a loss from where NT overtraded me into them. At least that gives me a chance to practice some price action trading .....

So my conclusion is: NT7's recalculate functionality is actually based more on black magic than a desired set of requirements.

EDIT: here's the thread I started on NT support forum to give them at least the second heads-up on this issue:

http://www.ninjatrader.com/support/forum/showthread.php?p=229342#post229342

You can discover what your enemy fears most by observing the means he uses to frighten you.

Last edited by Adamus; March 25th, 2011 at 11:49 AM.
Reply With Quote
 
  #18 (permalink)
Elite Member
London, UK
 
Futures Experience: Beginner
Platform: TradeLink, OpenQuant, considering anything that works...
Favorite Futures: if it trades...
 
Posts: 94 since Oct 2010
Thanks: 24 given, 38 received


Adamus View Post
While searching the NT forum for posts about the Recalculate option on strategies, I came across this little gem where I had actually posted to the thread - nothing useful, just more NT ambiguity:

NT support forum

The reason I was searching is that I unwisely switched on Recalculate on my live systems. I don't know what I was thinking - I should do experiments like that on Sim first - I am so stupid.

So now I have 2 unplanned positions to exit from - both at a loss from where NT overtraded me into them. At least that gives me a chance to practice some price action trading .....

So my conclusion is: NT7's recalculate functionality is actually based more on black magic than a desired set of requirements.

EDIT: here's the thread I started on NT support forum to give them at least the second heads-up on this issue:

Running strategies with connection loss handling set to 'recalculate' causing problem - NinjaTrader Support Forum

Adamus,

Thanks for your post.

Iíve read through the links you posted. You are right, the recalucate functionality does not appear to be based on any real requirement / use case. Sometimes Iím not convinced they have had someone who is actually using NT to system trade build their requirements. I wonder how they come up with the requirements of their requirements set?

I will add something to the summary (iíll find some words) regarding need to determine a way to reload the data, but Iím not sure if that functionality exists in the standard interface. We might need to ask that question in the forum.

Cheers,

drolles

Reply With Quote
 
  #19 (permalink)
Elite Member
London, UK
 
Futures Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker/Data: IB/IQFeed
Favorite Futures: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 470 given, 778 received


drolles View Post
I will add something to the summary (i’ll find some words) regarding need to determine a way to reload the data, but I’m not sure if that functionality exists in the standard interface. We might need to ask that question in the forum.

I recall someone telling me to check out an indicator that can load data on the fly - can't remember exactly what it was but I'll see if I can find it again.

You can discover what your enemy fears most by observing the means he uses to frighten you.
Reply With Quote
 
  #20 (permalink)
Elite Member
London, UK
 
Futures Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker/Data: IB/IQFeed
Favorite Futures: EUR/USD
 
Adamus's Avatar
 
Posts: 1,085 since Dec 2010
Thanks: 470 given, 778 received


It's the NT7 Pivots indicator.

It does stuff like this:

 
Code
if (existsHistDailyData) 
            {
                sessionDateDaily = GetLastBarSessionDate(Time[0], Bars, PivotRange.Daily);
                dailyBar = dailyBars.Get(dailyBars.GetBar(sessionDateDaily));

You can discover what your enemy fears most by observing the means he uses to frighten you.
Reply With Quote
The following user says Thank You to Adamus for this post:

Reply



futures io > > > > > Un-attended trading

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
     


All times are GMT -4. The time now is 01:35 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-17 in 0.15 seconds with 18 queries on phoenix via your IP 54.226.113.250