NexusFi: Find Your Edge


Home Menu

 





Unmanaged vs Managed orders


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Xeno with 9 posts (3 thanks)
    2. looks_two eman with 5 posts (7 thanks)
    3. looks_3 edgefirst with 4 posts (4 thanks)
    4. looks_4 baruchs with 3 posts (3 thanks)
      Best Posters
    1. looks_one eman with 1.4 thanks per post
    2. looks_two NinjaTrader with 1.3 thanks per post
    3. looks_3 edgefirst with 1 thanks per post
    4. looks_4 Xeno with 0.3 thanks per post
    1. trending_up 15,767 views
    2. thumb_up 23 thanks given
    3. group 9 followers
    1. forum 34 posts
    2. attach_file 0 attachments




 
Search this Thread

Unmanaged vs Managed orders

  #21 (permalink)
 Xeno 
UK
 
Experience: Intermediate
Platform: Ninja
Broker: Mirus/Zen
Trading: Futures - bonds, currencies, index
Posts: 288 since Oct 2010
Thanks Given: 70
Thanks Received: 274


ThatManFromTexas View Post
Unmanaged can work well... depending on your programming ability. Just remember, if things go to hell.... you're on your own.

If you don't have that attitude with managed too eventually you'll be in trouble.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Deepmoney LLM
Elite Quantitative GenAI/LLM
 
  #22 (permalink)
 
ThatManFromTexas's Avatar
 ThatManFromTexas 
Houston,Tx
 
Experience: Advanced
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: TF
Posts: 2,265 since Feb 2010
Thanks Given: 1,206
Thanks Received: 4,348


Xeno View Post
If you don't have that attitude with managed too eventually you'll be in trouble.


But at least with Managed... you can bitch about who's fault it is...

I'm just a simple man trading a simple plan.

My daddy always said, "Every day above ground is a good day!"
Reply With Quote
  #23 (permalink)
 traderwerks   is a Vendor
 
Posts: 692 since Jun 2009
Thanks Given: 436
Thanks Received: 465



ThatManFromTexas View Post
Unmanaged can work well... depending on your programming ability. Just remember, if things go to hell.... you're on your own.

I am in no way saying it cannot work.

From what I have seen, some jump to unmanaged when they could still do what they needed to do with managed.

No need to make things more complicated than they have to be.

And a hat tip to @baruchs

Math. A gateway drug to reality.
Reply With Quote
  #24 (permalink)
 eman 
Galveston ,TX
 
Experience: Intermediate
Platform: NT7
Broker: Zaner
Trading: Futures
Posts: 386 since Mar 2010
Thanks Given: 364
Thanks Received: 435

i agree with @traderwerks - some ppl jump prematurely.

for those who like to program at the lowest possible level and create their own abstraction layer, unmanaged can be leveraged to generate more reusable code blocks with fewer lines. win-win!

cheers,
-e

Reply With Quote
  #25 (permalink)
 edgefirst 
Las Cruces, NM
 
Experience: Advanced
Platform: Tradestation, MC, NT
Broker: TradeStation, IB
Trading: Liquid futures contracts
Posts: 56 since Sep 2009
Thanks Given: 389
Thanks Received: 86

Going unmanaged requires a lot of work upfront. A simple example would be SetStopLoss(). The plumbing work is done in managed mode so that a user can simply call the method without much thought of it. In Unmanaged mode, one has to write the code that handles the low-level management of stoploss orders.

Another factor to consider is that unit-testing of error-handling code in NT is not easy. This will limit the complexity of code an individual trader can accomplish. From time to time, I have to remind myself that I am a trader, not a software developer.

Reply With Quote
Thanked by:
  #26 (permalink)
 Xeno 
UK
 
Experience: Intermediate
Platform: Ninja
Broker: Mirus/Zen
Trading: Futures - bonds, currencies, index
Posts: 288 since Oct 2010
Thanks Given: 70
Thanks Received: 274


edgefirst View Post
Going unmanaged requires a lot of work upfront. A simple example would be SetStopLoss(). The plumbing work is done in managed mode so that a user can simply call the method without much thought of it. In Unmanaged mode, one has to write the code that handles the low-level management of stoploss orders.

I don't think it's so different for stop loss, as an example. Issuing the stop loss is one call, and the extra thing is just cancelling it when the position is closed (and even that is automatic if you OCO it with an exit)


Quoting 
Another factor to consider is that unit-testing of error-handling code in NT is not easy. This will limit the complexity of code an individual trader can accomplish. From time to time, I have to remind myself that I am a trader, not a software developer.

I'm not sure that's so different between managed and unmanaged. Much error handling still has to be covered in both approaches.

Recent posts have suggested that some people may go to unmanaged too soon. Do you have an example of that where it's turned out to be a bad thing? OK, if you're not a decent programmer, don't do it, but I would have thought a well written unmanaged library would usually be preferable to using the managed orders. The difference in the strategy itself is minimal.

(As an aside, if you're writing the unmanaged stuff in your strategy and not doing some sort of reusable blocks I would have thought it very likely that unmanaged is not for you)

Started this thread Reply With Quote
  #27 (permalink)
 edgefirst 
Las Cruces, NM
 
Experience: Advanced
Platform: Tradestation, MC, NT
Broker: TradeStation, IB
Trading: Liquid futures contracts
Posts: 56 since Sep 2009
Thanks Given: 389
Thanks Received: 86


Xeno View Post
I don't think it's so different for stop loss, as an example. Issuing the stop loss is one call, and the extra thing is just cancelling it when the position is closed (and even that is automatic if you OCO it with an exit)

We are talking about the same thing. Your unmanaged code will have to track the change of position. Adding to that you have profit targets, it is some work. The coding probably will take about a couple of hours, but the testing and covering of rare cases like overfill, rejected orders, would take weeks (and I talked about the difficulty of unit-testing in NT environment, which makes it an even more difficult job). You would want to complete the test before you can use even a basic feature like Stoploss. Bugs, in this kind of software, can cost big money, your money.

In a managed environment, most of the work (coding, testing of position/order tracking) is done. That makes a difference in terms of how much confidence you put on the code.


Xeno View Post
I'm not sure that's so different between managed and unmanaged. Much error handling still has to be covered in both approaches.

Agreed. I was referring to the unit-testing of extra working associated with unmanaged code, such as basic position/order tracking.

Unmanaged approach offers much more flexibility, but we have to weave our own safety net and that takes time and patience because one will not see any progress in trading system development while doing the plumbing work, although it is necessary if the unmanaged path is chosen.

Reply With Quote
  #28 (permalink)
 Xeno 
UK
 
Experience: Intermediate
Platform: Ninja
Broker: Mirus/Zen
Trading: Futures - bonds, currencies, index
Posts: 288 since Oct 2010
Thanks Given: 70
Thanks Received: 274


edgefirst View Post
We are talking about the same thing. Your unmanaged code will have to track the change of position. Adding to that you have profit targets, it is some work. The coding probably will take about a couple of hours, but the testing and covering of rare cases like overfill, rejected orders, would take weeks

I believe I'm right in saying that overfills and rejections are pretty much the same in both cases. i.e. the same default behaviour will occur.

(profit target is irrelevent here - we're talking about stoploss only)

Started this thread Reply With Quote
  #29 (permalink)
 edgefirst 
Las Cruces, NM
 
Experience: Advanced
Platform: Tradestation, MC, NT
Broker: TradeStation, IB
Trading: Liquid futures contracts
Posts: 56 since Sep 2009
Thanks Given: 389
Thanks Received: 86


Xeno View Post
I believe I'm right in saying that overfills and rejections are pretty much the same in both cases. i.e. the same default behaviour will occur.

(profit target is irrelevent here - we're talking about stoploss only)


Yes, you are right. The default error handling behavior is the same so it makes no difference whether you use managed or unmanaged.

I mentioned about profit target because it is a basic feature for many traders. If you do not use profit targets at all, then it is irrelevant. If you do, sooner or later you will have to add it in. Then the stoploss-handling code and profit target-handling code would become highly coupled and difficult to debug because they have that OCO-kind of relationship. OCO orders appear to be the answer. However, when I was thinking about the architecture, OCO orders did not seem to be a good solution to the problem if I plan to reuse the code in many of my strategies. But I can be wrong.

Reply With Quote
Thanked by:
  #30 (permalink)
 Xeno 
UK
 
Experience: Intermediate
Platform: Ninja
Broker: Mirus/Zen
Trading: Futures - bonds, currencies, index
Posts: 288 since Oct 2010
Thanks Given: 70
Thanks Received: 274



edgefirst View Post
Yes, you are right. The default error handling behavior is the same so it makes no difference whether you use managed or unmanaged.

I mentioned about profit target because it is a basic feature for many traders. If you do not use profit targets at all, then it is irrelevant. If you do, sooner or later you will have to add it in. Then the stoploss-handling code and profit target-handling code would become highly coupled and difficult to debug because they have that OCO-kind of relationship. OCO orders appear to be the answer. However, when I was thinking about the architecture, OCO orders did not seem to be a good solution to the problem if I plan to reuse the code in many of my strategies. But I can be wrong.

I meant profit target is irrelevent if we're just comparing stop loss.

I don't see the problem with OCO for this, esp when you could have the strat set a flag to turn OCO on/off. However, the way I have designed my library, I don't see this as a problem without OCO too. Each type of order has a var name, and I always call my own library OnExecution, so it's always just

if execution is profit and stop is working/pending
cancel stop

and vice versa.

Started this thread Reply With Quote




Last Updated on March 6, 2015


© 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