Dude, Where’s My Order ? (Where Is My Order When NinjaTrader Crashes )

Posted by TraderWerks | Indicators | Thursday 5 August 2010 2:52 am

Dude, Where’s My Order

I thought Dude, Where’s My Car was a great mindless comedy. No need to engage any brain cells on that one. Ashton Kutcher who starred in the movie went on to make lots more mindless comedy. I saw a post on the “Interwebs” that made me think of that movie.

I saw this post on ET ( EliteTrader )

I long 1 ES contract at 1109.50, put stop-loss at 1107.25 and target at 1111.25. I was stopped out at 1107.25 ( 2.25 points ), but my target was later executed at 1111.50 ( another loss of 0.25 point ). The total loss of 2.50 points ( $125.00 ) and I was charged $9.60 which was for 2 contracts.

Both AMP Futures and Dorman Trading did not give me explanation after 1 week.

Don’t know what went wrong with the trade. The amount of money is small in this case, do I just accept it and move on?

I noticed, because I trade with Dorman/AMP. I have never had anything like that happen to me. Strange I thought.

Later, the same person posted…

I usually set the stop-loss and profit target through the NinjaTrader ATM strategy and the execution is without problem. That means if either the target or stop-loss is hit, the other will automatically being cancelled.

But in this case, my target price ( 1111.25 ) turned into another short order, and amazingly being stopped out just 0.25 point away ( 1111.50 ). Who determined that exit point for me?

I turned off my trading platform before the target / stop-loss was hit, so got no idea what actually happened to my pending orders. I usually do so without any problem.

I removed the names to protect the innocent. But is is a valid question, with an embarrassing answer.

OCO ORDERS.

A little background is in order. One Cancels the Other is abbreviated as OCO. Traders use OCO orders in NinjaTrader a lot without even knowing it. Whenever you use the Ninja ATM ( Advanced Trade Management ) which sets a stop loss and a profit target, THAT is an OCO order.

Ninja places TWO orders in the market after you enter the trade. One is the profit target order and the other is a stop loss. Say you are long, the profit target is a short limit order above the market and a short stop market order for the stop loss order.

For most brokers, when you enter the order, the two orders ( profit & stop loss ) are sent to the broker who sends them to the exchange and they then sit on the exchange book. The exchange knows nothing about your OCO order, and neither do most borkers. Just that there are two orders there, it is up to the trader ( on Ninja ) to take care of closing things out or your broker if your broker supports that functionality.

WHAT HAPPENED

What happened was exactly what should have happened. S/He was long a contract with two orders on the exchange book, the profit target and the stop loss. The Trader closed Ninjatrader and the stop loss order was executed. With his computer turned off, Ninja was not around to cancel the profit order on the exchange book.

So looking at their position. Long order stopped out so they are flat with a short order sitting on the exchange books. That short order does not have a stop loss or profit target. Just a short order sitting there.

So one of three things can happen

  1. The market does not rally, And at the end of the day, the order cancels with out being executed
  2. The market goes up and hits his stop and then plummets , making him boatloads of money
  3. The market goes up, hits his stop and keeps going up and blows a lot of cash before the end of day or end of margin ( whichever comes first )

The third scenario is why you really should know where your orders live. If you want the safety of being able to turn off your computer and walk away in the middle of a trade, use a broker that keeps your OCO order on their server or host Ninjatrader somewhere.

SO WHAT ELSE COULD GO WRONG ?

Let’s see. Besides walking away from your computer.. Floods, power outages, locusts, system lockups and your two year old turning off your power-strip because it had a pretty light. Anything that can go wrong , will.

So when you lose connectivity or you computer catches fire or whatever. You can always call your your broker and ask him to take your account flat.

You do have to think about these things especially if you are auto trading. One of my clients asked me to write code so when his laptop battery was low on power, close all of his trades. He normally trades with the power attached to his laptop, but just in case he stepped out after entering a trade, his laptop would continue to move his stops.

SO WHERE IS MY ORDER ?

Here is a list of brokers/technologies and where the OCO orders are handled. Basically, TD Ameritrade & IB support it, for everyone else, the orders live on your computer.

Zen-Fire OCO Handled by your PC
Vision Financial Markets OCO Handled by your PC
Interactive Brokers OCO Handled by the broker
Patsystems OCO Handled by your PC
PFGBEST.com OCO Handled by your PC
Trading Technologies OCO Handled by your PC
MB Trading OCO Handled by your PC
GAIN Capital/Forex.com OCO Handled by your PC
TD Ameritrade OCO Handled by the broker
FuturesBetting OCO Handled by your PC

Photo curtesy of dave_7