NexusFi: Find Your Edge


Home Menu

 





Showing Stop Orders in Ninja/cause you to be taken out


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Jigsaw Trading with 5 posts (8 thanks)
    2. looks_two djkiwi with 5 posts (1 thanks)
    3. looks_3 NinjaTrader with 3 posts (12 thanks)
    4. looks_4 blb014 with 2 posts (0 thanks)
      Best Posters
    1. looks_one Fat Tails with 8.5 thanks per post
    2. looks_two NinjaTrader with 4 thanks per post
    3. looks_3 NJAMC with 2 thanks per post
    4. looks_4 Jigsaw Trading with 1.6 thanks per post
    1. trending_up 20,223 views
    2. thumb_up 45 thanks given
    3. group 17 followers
    1. forum 32 posts
    2. attach_file 1 attachments




 
Search this Thread

Showing Stop Orders in Ninja/cause you to be taken out

  #1 (permalink)
 
Rad4633's Avatar
 Rad4633 
Greensboro NC
 
Experience: Advanced
Platform: TOS/ NT Dorman
Trading: ES TF CL
Posts: 1,357 since Sep 2011
Thanks Given: 2,657
Thanks Received: 894

@Big Mike @Fat Tails anyone
Showing Stop Orders in Ninja/cause you to be taken out, need clarification here. Alot of traders say they dont use stop loss orders because they dont want anyone trading against them.. you know what I mean taking out there stops.... But with Ninja our orders set on our pc right, so how can they be seen or taken out. Ive heard this mentioned alot and Im curious am I wrong or others are???? I know with Thinkorswim our orders sit on their servers which can be seen and if they are a huge number at one location I could see how this could happen.

Many Thx in advance by answering this one

Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Increase in trading performance by 75%
The Elite Circle
Better Renko Gaps
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
27 thanks
Diary of a simple price action trader
26 thanks
Tao te Trade: way of the WLD
23 thanks
My NQ Trading Journal
14 thanks
HumbleTraders next chapter
9 thanks
  #2 (permalink)
 
mattz's Avatar
 mattz   is a Vendor
 
Posts: 2,493 since Sep 2010
Thanks Given: 2,441
Thanks Received: 3,791


Rad4633 View Post
@Big Mike @Fat Tails anyone
Showing Stop Orders in Ninja/cause you to be taken out, need clarification here. Alot of traders say they dont use stop loss orders because they dont want anyone trading against them.. you know what I mean taking out there stops.... But with Ninja our orders set on our pc right, so how can they be seen or taken out. Ive heard this mentioned alot and Im curious am I wrong or others are???? I know with Thinkorswim our orders set on there servers which can be seen.

Many Thx in advance by answering this one

Regular stop orders sit on the exchange, not on your machine.
OCO orders which consist of Stops and Limits placed on NinjaTrader will be sitting on your machine.

If your REGULAR stops (BUY STOP, SELL STOP) sit on someones server and not the exchange, I would be worried, but I doubt that is the case. Regular stops should sit on the exchange.

Also, IMHO traders don't place stops because their stops get triggered and as annoying as it maybe, you cant trade without them. Often, traders look at a few seconds or two past their stop, and see the market has reversed once it was hit.
Where to place stops require a whole discussion all together. Hope this helps.

Trading futures and options involves substantial risk of loss and is not suitable for all investors. Past performance is not necessarily indicative of future results. You may lose more than your initial investment. All posts are opinions and do not claim to be facts. Please conduct your own due diligence. Use only Risk capital when trading Futures.
1 800 771 6748 local 561 367 8686 email [email protected]
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #3 (permalink)
 
Rad4633's Avatar
 Rad4633 
Greensboro NC
 
Experience: Advanced
Platform: TOS/ NT Dorman
Trading: ES TF CL
Posts: 1,357 since Sep 2011
Thanks Given: 2,657
Thanks Received: 894



mattz View Post
Regular stop orders sit on the exchange, not on your machine.
OCO orders which consist of Stops and Limits placed on NinjaTrader will be sitting on your machine.

If your REGULAR stops (BUY STOP, SELL STOP) sit on someones server and not the exchange, I would be worried, but I doubt that is the case. Regular stops should sit on the exchange.

Also, IMHO traders don't place stops because their stops get triggered and as annoying as it maybe, you cant trade without them. Often, traders look at a few seconds or two past their stop, and see the market has reversed once it was hit.
Where to place stops require a whole discussion all together. Hope this helps.

Thx Matt for reply,

I'll ring you tom am for more details

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #4 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


Rad4633 View Post
@ Big Mike @ Fat Tails anyone
Showing Stop Orders in Ninja/cause you to be taken out, need clarification here. Alot of traders say they dont use stop loss orders because they dont want anyone trading against them.. you know what I mean taking out there stops.... But with Ninja our orders set on our pc right, so how can they be seen or taken out. Ive heard this mentioned alot and Im curious am I wrong or others are???? I know with Thinkorswim our orders sit on their servers which can be seen and if they are a huge number at one location I could see how this could happen.

Many Thx in advance by answering this one

There is not an easy answer to that question, the correct answer depends on the order type, the broker to which NinjaTrader is connected and whether you are running an automated strategy as opposed to discretionary trading.

Generally there are 3 cases, which are possible

(1) simulated stop order, which is held on your PC and converted to market order once the stop price has been hit
(2) simulated stop order, which is held by your broker and converted to a market order once the stop price has been hit
(3) hard stop order residing in the exchange

Now let us look at some examples for the 3 cases


Simulated Stop Orders Held on Your PC

For discretionary trading there are two cases, when orders may be locally held

-> stop orders with a volume trigger: these are always simulated as no broker or exchange supports them
-> OCO (bracket) orders: these are also simulated on your PC unless your orders are executed through Interactive Brokers or TD Ameritrade, in this case the OCO order is transmitted to the broker, who may either simulate it on their servers or further route it to the exchange

Some more details on brokers are here:

Where do your orders reside? - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

If you are running an automated strategy and use the managed approach, both the SetStopLoss() and the SetTrailStop() methods include a parameter, which allows you to specify, whether they are locally held or transmitted to the broker / exchange. For further information see NinjaTrader Help File "Managed Approach".


Simulated Stop Orders Held by the Broker

Once NinjaTrader has transmitted a stop order to your broker, the broker can either further route that order to the exchange (hard stop) or simulate it.

Why should a broker simulate a stop order and not transmit it to the exchange? The answer is that not all order types are supported by every exchange.

-> For a stop order set up with the DOM, NinjaTrader allows you to select between a stop market and a stop limit order. If the order type that you selected is not natively supported by the exchange, your broker will probably simulate it.

For example if you trade TF (Russell 2000) via ICE, you may have noticed that ICE does not support stop market orders. Therefore, if you send a stop market order to your broker, he will likely simulate that stop market order and only send a market order to the exchange, once the stop level has been hit. If you wish that your stop order resides on the exchange, you would need to select a stop limit order via the NinjaTrader DOM, as ICE natively supports stop limit orders and the broker does not need to simulate them.

-> Some brokers also offer protection features, such as a feature against partial fill. If you turn one of these features on, the broker may also simulate your order instead of sending them directly to the exchange. This depends on your broker and not on NinjaTrader.


Orders Held on the Exchange

In case that both NinjaTrader and your Broker do not simulate but route the stop order, it will reside on the exchange. Now you are afraid to put your order on the exchange, because it becomes visible in the order book. This is true, but does it really matter?

The answer is that it matters, if you are a huge trader (but then you may be interested in using iceberg orders) or if you are engaging in games with a FOREX broker, who trades against his customers. As a small trader participating in an exchange game you may go unnoticed without attracting an algorithmic predator. This is actually a prisoner's dilemma (see game theory), you are better off putting a hard stop, but if everybody acts like you, nobody will benefit from it, as the aggregated stops will finally attract predators.

I personally prefer hard stops for several reasons. In case that your internet connection to the broker or the internet connection from the broker to the exchange is disrupted, your order will still be triggered. Also it will be triggered much faster under adverse market conditions. A stop order that resides on the exchange, will be executed within a fraction of a millisecond, when my stop is hit. A stop order that resides on my PC will be triggered about 300 ms later, which can lead to significant slippage. I know that I can reduce the latency by renting server space near the exchange and running NinjaTrader on such a server.


Using Both Simulated and Hard Stops

For some of my automated strategies I have combined a simulated stop locally held (triggered at bar close only), with a wider hard stop, which I use as emergency stop. For the hard stop I use a multiple of the average true range added or subtracted from the previous bar close, which gets me out of the market in an emergency case. This stop can be trailed in both directions.

Reply With Quote
  #5 (permalink)
 
Jigsaw Trading's Avatar
 Jigsaw Trading  Jigsaw Trading is an official Site Sponsor
 
Posts: 2,988 since Nov 2010
Thanks Given: 831
Thanks Received: 10,393


Rad4633 View Post
@Big Mike @Fat Tails anyone
Showing Stop Orders in Ninja/cause you to be taken out, need clarification here. Alot of traders say they dont use stop loss orders because they dont want anyone trading against them.. you know what I mean taking out there stops.... But with Ninja our orders set on our pc right, so how can they be seen or taken out. Ive heard this mentioned alot and Im curious am I wrong or others are???? I know with Thinkorswim our orders sit on their servers which can be seen and if they are a huge number at one location I could see how this could happen.

Many Thx in advance by answering this one

You trading a lot of size???

If I went long 1 contract on the ES right now (overnight) with a 10 tick stop loss, there would be 1990 contracts ahead of me.

So - to get to my 1 tick stop, 'they'd' need to chew through 1990 contracts to stop me out. It's pretty unlikely they'd do that for my $125

It's really not an issue. The issues is in putting your stops right where everyone else does. In that case, 'they' don't stop you out because they can see the stops. It's more a case that 'they' know where retailers put their stops anyway, they don't need to see your stop orders for that.

My opinion is that this is a non-issue.

Visit my NexusFi Trade Journal Reply With Quote
  #6 (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,394


Rad4633 View Post
@ Big Mike @ Fat Tails anyone
Showing Stop Orders in Ninja/cause you to be taken out, need clarification here. Alot of traders say they dont use stop loss orders because they dont want anyone trading against them.. you know what I mean taking out there stops.... But with Ninja our orders set on our pc right, so how can they be seen or taken out. Ive heard this mentioned alot and Im curious am I wrong or others are???? I know with Thinkorswim our orders sit on their servers which can be seen and if they are a huge number at one location I could see how this could happen.

Many Thx in advance by answering this one

I used to think I was getting taken out by the big guys with my stops, later did I realize, my stop was a great Support/Resistance position. I was getting taken out because my stop was in the middle of the activate trading range (pull backs, etc). Needed to push them out beyond the S/R.

Nil per os
-NJAMC [Generic Programmer]

LOM WIKI: NT-Local-Order-Manager-LOM-Guide
Artificial Bee Colony Optimization
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #7 (permalink)
 
NinjaTrader's Avatar
 NinjaTrader  NinjaTrader is an official Site Sponsor
Site Sponsor

Web: NinjaTrader
AMA: Ask Me Anything
Webinars: NinjaTrader Webinars
Elite offer: Click here
 
Posts: 1,713 since May 2010
Thanks Given: 203
Thanks Received: 2,686


mattz View Post
OCO orders which consist of Stops and Limits placed on NinjaTrader will be sitting on your machine.

This above statement is incorrect.

First, thanks to @ Fat Tails for his very thorough response. I would just like to provide a boiled down official response from NinjaTrader.

- With the exception of a NinjaTrader simulated stop which is an optional feature of of our product (more information here Simulated Stop Orders)
- All orders are submitted to the broker and not simulated on your local PC by NinjaTrader
- For futures, most if not all orders are transmitted to the exchange from your broker
- Equities are different since having two exit orders at the exchange or liquidity pool violates exchange order handling rules thus a broker might submit one exit order to the market and simulate the other on their server
- NinjaTrader may simulate the OCO functionality of bracketed orders locally however, the orders are passed through and working either at your broker or the exchange

Follow me on Twitter Reply With Quote
  #8 (permalink)
 
djkiwi's Avatar
 djkiwi 
Mercer Island WA
 
Experience: Advanced
Platform: Ninjatrader/Strategy Desk
Broker: Various
Trading: TF/NQ/ES/Stocks
Posts: 561 since May 2010
Thanks Given: 981
Thanks Received: 1,558

Hi Ninjatrader, thanks for the response but now I am more confused than before. I am a great fan of Ninjatrader and the excellent support you guys provide but to date have not signed up for a lifetime license due to this OCO issue.

Using Ninja ATM strategies running though a strategy script I leave positions overnight and have woken up in the morning with naked positions and sometimes large losses due to outages of one form or another. Fortunately these have been on sim.

To counter this risk I've been entering live orders directly into IB based on signals from Ninjatrader. I only use limit orders for entries although market stops.

I've been using Zenfire as the data feed as the IB datafeed is aggregated and of little use to me primarily as a cumulative delta trader. This is far from my ideal solution as I have spent quite a bit of time developing ATM strategies and would like place trades directly through ninjatrader to the brokerage.

The OCO issue has been raised several times on the ninjatrader forum and this helpful link summarizes the situation in respect of individual brokers which states OCO orders are simulated on the trader's local PC with the exception of IB. If this is still accurate it's disappointing other brokerages have not stepped up the plate to mitigate trader risk. There really needs to be much better clarity on this issue from the broker end.

Where do your orders reside? - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

So in respect of this, can you please advise how the following scenario is protected.

Attached is a chart that shows user drawn lines for stop, target 1, target 2 and target 3. For example as I move the red lines up and down the stop orders are automatically modified and sent to the broker using the following code. If there is a target 3 it will move a target 3 stop.

 
Code
                            
AtmStrategyChangeStopTarget(0lineStopline"STOP1"atmStrategyId1);                    
AtmStrategyChangeStopTarget(0lineStopline"STOP2"atmStrategyId1);  
if (
DrawObjects["T3"]!=null){AtmStrategyChangeStopTarget(0lineStopline"STOP3"atmStrategyId1);} 
Questions are as follows:

1. Is the above code considered a simulated stop? It doesn't seem to fall within the definition based on the link you provided.
2. Assume I am in a 3 contract position and the feed goes down/or there is a power outage for an hour and during that time the price drops below the red line what happens to the stops and targets upon reconnection? Based on the link I posted before it would suggest if using IB the trade would be closed at the red line stop amount as it was transmitted and held on their server?
3. What would happen if I used Zenfire? Would I be in a live position of 3 contracts with no stops or targets?
4. Based on the attached chart my stops for Targets 2 and 3 move to breakeven once the realized profit has exceeded $1 (ie target 1 has been hit). I use the following code for this. Again what happens if Target 1 is hit? Would that instruction to move the red line stop to breakeven be reflected on IB and/or Zenfire's servers or would the remaining stops just stay where it is or would it be cancelled?

 
Code
                            
if (GetAtmStrategyRealizedProfitLoss(atmStrategyId1) >1)
                        
                    {                    
                    
AtmStrategyChangeStopTarget(0GetAtmStrategyPositionAveragePrice(atmStrategyId1)+1*TickSize"STOP2"atmStrategyId1);    
                    if (
DrawObjects["T3"]!=null){AtmStrategyChangeStopTarget(0GetAtmStrategyPositionAveragePrice(atmStrategyId1)+1*TickSize"STOP3"atmStrategyId1);}        
                    } 
Thanks in advance
DJ

Attached Thumbnails
Click image for larger version

Name:	OCO issues.JPG
Views:	373
Size:	240.0 KB
ID:	69322  
Reply With Quote
  #9 (permalink)
 
NinjaTrader's Avatar
 NinjaTrader  NinjaTrader is an official Site Sponsor
Site Sponsor

Web: NinjaTrader
AMA: Ask Me Anything
Webinars: NinjaTrader Webinars
Elite offer: Click here
 
Posts: 1,713 since May 2010
Thanks Given: 203
Thanks Received: 2,686


djkiwi View Post
Hi Ninjatrader, thanks for the response but now I am more confused than before. I am a great fan of Ninjatrader and the excellent support you guys provide but to date have not signed up for a lifetime license due to this OCO issue.

Using Ninja ATM strategies running though a strategy script I leave positions overnight and have woken up in the morning with naked positions and sometimes large losses due to outages of one form or another. Fortunately these have been on sim.

To counter this risk I've been entering live orders directly into IB based on signals from Ninjatrader. I only use limit orders for entries although market stops.

I've been using Zenfire as the data feed as the IB datafeed is aggregated and of little use to me primarily as a cumulative delta trader. This is far from my ideal solution as I have spent quite a bit of time developing ATM strategies and would like place trades directly through ninjatrader to the brokerage.

The OCO issue has been raised several times on the ninjatrader forum and this helpful link summarizes the situation in respect of individual brokers which states OCO orders are placed at the brokerage with the exception of IB. If this is still accurate it's disappointing other brokerages have not stepped up the plate to mitigate trader risk. There really needs to be much better clarity on this issue from the broker end.

Where do your orders reside? - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

So in respect of this, can you please advise how the following scenario is protected.

Attached is a chart that shows user drawn lines for stop, target 1, target 2 and target 3. For example as I move the red lines up and down the stops are automatically modified by using the following code. If there is a target 3 it will move a target 3 stop.

 
Code
                            
AtmStrategyChangeStopTarget(0lineStopline"STOP1"atmStrategyId1);                    
AtmStrategyChangeStopTarget(0lineStopline"STOP2"atmStrategyId1);  
if (
DrawObjects["T3"]!=null){AtmStrategyChangeStopTarget(0lineStopline"STOP3"atmStrategyId1);} 
Questions are as follows:

1. Is the above code considered a simulated stop? It doesn't seem to fall within the definition based on the link you provided.
2. Assume I am in a 3 contract position and the feed goes down/or there is a power outage for an hour and during that time the price drops below the red line what happens to the stops and targets upon reconnection? Based on the link I posted before it would suggest if using IB the trade would be closed at the red line stop amount as it was transmitted and held on their server?
3. What would happen if I used Zenfire? Would I be in a live position of 3 contracts with no stops or targets?
4. Based on the attached chart my stops for Targets 2 and 3 move to breakeven once the realized profit has exceeded $1 (ie target 1 has been hit). I use the following code for this. Again what happens if Target 1 is hit? Would that instruction to move the red line stop to breakeven be reflected on IB and/or Zenfire's servers or would the remaining stops just stay where it is or would it be cancelled?

 
Code
                            
if (GetAtmStrategyRealizedProfitLoss(atmStrategyId1) >1)
 
                    {                    
                    
AtmStrategyChangeStopTarget(0GetAtmStrategyPositionAveragePrice(atmStrategyId1)+1*TickSize"STOP2"atmStrategyId1);    
                    if (
DrawObjects["T3"]!=null){AtmStrategyChangeStopTarget(0GetAtmStrategyPositionAveragePrice(atmStrategyId1)+1*TickSize"STOP3"atmStrategyId1);}        
                    } 
Thanks in advance
DJ

1. I can't tell if its a simulated stop since this is determined by the ATM Strategy template that your code is calling. You would need to check the ATM strategy itself to see if Simulated Stop is enabled.
2. If not using a simulated stop, your stop order would be triggered and filled. If with IB, OCO orders are held on their servers thus the OCO paired target would be cancelled. If on Zen-Fire, then the target would still be working or filled if the market moved back past your target order.
3. See answer #2.
4. ATM strategy logic is local to your PC. Stops and target orders are at the exchange/broker with the execption of a simulated stop.

Follow me on Twitter Reply With Quote
Thanked by:
  #10 (permalink)
 
djkiwi's Avatar
 djkiwi 
Mercer Island WA
 
Experience: Advanced
Platform: Ninjatrader/Strategy Desk
Broker: Various
Trading: TF/NQ/ES/Stocks
Posts: 561 since May 2010
Thanks Given: 981
Thanks Received: 1,558


Thanks for the quick response. Please see other points.


NinjaTrader View Post
1. I can't tell if its a simulated stop since this is determined by the ATM Strategy template that your code is calling. You would need to check the ATM strategy itself to see if Simulated Stop is enabled.

To tell the truth I was under the impression that it was ATM strategies themselves that resulted in PC simulated OCO orders. I hadn't even noticed that simulated stop parameter in the template. Thanks for clarifying that. My simulated stop is set to zero so it is not simulated.


NinjaTrader View Post

2. If not using a simulated stop, your stop order would be triggered and filled. If with IB, OCO orders are held on their servers thus the OCO paired target would be cancelled. If on Zen-Fire, then the target would still be working or filled if the market moved back past your target order.

On this one, so IB would be ok. If the stop was hit, all the targets would be cancelled.

I am still unclear with Zenfire, if the price dropped below the red stop line during the outage are you saying I would have been stopped out but the 3 targets would still be live as naked open orders until I canceled them manually through Ninjatrader?


NinjaTrader View Post
4. ATM strategy logic is local to your PC. Stops and target orders are at the exchange/broker with the execption of a simulated stop.

So on this one, if Target one had been hit during the outage then the remaining stops for Targets 2 and 3 would remain where they were prior to the reconnection due to them being on their servers at that point. The stops would only move to breakeven for both IB and Zenfire ONLY on reconnection?

Thanks in advance DJ

Reply With Quote




Last Updated on October 7, 2018


© 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