NexusFi: Find Your Edge


Home Menu

 





Un-attended trading


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one drolles with 9 posts (1 thanks)
    2. looks_two Adamus with 5 posts (1 thanks)
    3. looks_3 MXASJ with 2 posts (1 thanks)
    4. looks_4 traderwerks with 1 posts (0 thanks)
      Best Posters
    1. looks_one Trader.Jon with 1 thanks per post
    2. looks_two MXASJ with 0.5 thanks per post
    3. looks_3 Adamus with 0.2 thanks per post
    4. looks_4 drolles with 0.1 thanks per post
    1. trending_up 7,677 views
    2. thumb_up 5 thanks given
    3. group 6 followers
    1. forum 20 posts
    2. attach_file 0 attachments




 
Search this Thread

Un-attended trading

  #11 (permalink)
 drolles 
London, UK
 
Experience: Beginner
Platform: TradeLink, OpenQuant, considering anything that works...
Trading: if it trades...
Posts: 94 since Oct 2010
Thanks Given: 24
Thanks Received: 39


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

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
REcommedations for programming help
Sierra Chart
Trade idea based off three indicators.
Traders Hideout
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
  #12 (permalink)
 drolles 
London, UK
 
Experience: Beginner
Platform: TradeLink, OpenQuant, considering anything that works...
Trading: if it trades...
Posts: 94 since Oct 2010
Thanks Given: 24
Thanks Received: 39


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



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

Started this thread Reply With Quote
  #13 (permalink)
 drolles 
London, UK
 
Experience: Beginner
Platform: TradeLink, OpenQuant, considering anything that works...
Trading: if it trades...
Posts: 94 since Oct 2010
Thanks Given: 24
Thanks Received: 39


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

Started this thread Reply With Quote
  #14 (permalink)
 drolles 
London, UK
 
Experience: Beginner
Platform: TradeLink, OpenQuant, considering anything that works...
Trading: if it trades...
Posts: 94 since Oct 2010
Thanks Given: 24
Thanks Received: 39


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

Started this thread Reply With Quote
  #15 (permalink)
 
NJAMC's Avatar
 NJAMC 
Atkinson, NH USA
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker: NinjaTrader Brokerage
Trading: Futures, CL, ES, ZB
Posts: 1,970 since Dec 2010
Thanks Given: 3,037
Thanks Received: 2,395


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...

Visit my NexusFi Trade Journal Reply With Quote
  #16 (permalink)
 
Adamus's Avatar
 Adamus 
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
Posts: 1,085 since Dec 2010
Thanks Given: 471
Thanks Received: 789


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 - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #17 (permalink)
 
Adamus's Avatar
 Adamus 
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
Posts: 1,085 since Dec 2010
Thanks Given: 471
Thanks Received: 789

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:

https://forum.ninjatrader.com/showthread.php?p=229342

You can discover what your enemy fears most by observing the means he uses to frighten you.
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #18 (permalink)
 drolles 
London, UK
 
Experience: Beginner
Platform: TradeLink, OpenQuant, considering anything that works...
Trading: if it trades...
Posts: 94 since Oct 2010
Thanks Given: 24
Thanks Received: 39


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 - [AUTOLINK]NinjaTrader[/AUTOLINK] 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

Started this thread Reply With Quote
  #19 (permalink)
 
Adamus's Avatar
 Adamus 
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
Posts: 1,085 since Dec 2010
Thanks Given: 471
Thanks Received: 789


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.
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #20 (permalink)
 
Adamus's Avatar
 Adamus 
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
Posts: 1,085 since Dec 2010
Thanks Given: 471
Thanks Received: 789


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.
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:




Last Updated on May 2, 2011


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts