GT
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Market Gaps and Stop Orders
Collapse
X
-
Market Gaps and Stop Orders
How does NT handle stop orders with market gaps. This morning I had a trade that was supposed to be close[0] - .0010 but the market gapped by more than .0010 and NT gave an error message (sell stop limits cannot be placed above the market) and shut down my strategy. Shouldn't this order (stop order) just turn into a market order once the price gapped below it or does this have something to do with how the order was place? Any thoughts on how to fix this for the future? Thanks!
GTTags: None
-
The reason this happens is because your order is not submitted till market open. When it is submitted at market open it failed to be a valid price and that is why the strategy was halted.
To fix this you would need to program in your own checks on the price before you submit. Do not submit the day before because you would not know the opening gap at that point. You would need more granularity.Josh P.NinjaTrader Customer Service
-
I have used tradestation in the past where it was possible to enter based on the open of a bar +- certain amount. What other ways are there to check for this before submitting the order. I want to place the order but I would like to use a stop order (close[0] - .0010) instead of a market order (if x . . . sell at market) order to ensure the market is moving in the "right" direction.
Comment
-
I am trading on a multi time frame chart (5 minute primary and 1 minute secondary) where the signals are based on the primary bars and place on the secondary bars. The issue is that my order is place at close[0]-.0005 and if the open of the next bar is less than that it shuts down the strategy because it is basically placing a sell stop above the market, which it cannot do, of course. How can I avoid this? Thank you for your help and sorry for the probably basic questions.
GT
Comment
-
Multi-time frame is fine. Just get your trigger condition from the 5min, go to the 1min and submit after the open. If you are using CalcualteOnBarClose = false you can avoid waiting for 1 bar to close, otherwise you will have to wait for the 1st bar to close before you can get that order in.
Basically you need to wait for the first tick, evaluate the price, submit a properly priced order on the 1min time frame.Josh P.NinjaTrader Customer Service
Comment
-
So if I use something like:
on a 5 minute chart with a 1 minute secondary time frame it will not look at this line until the 1 minute bar closes? If I wanted it to look at it right away would I have to change my secondary time frame to 1 second? Is this the right way to go with this or is there another simpler way? Thanks!Code:entryOrder = EnterShortStop(1, true, 1, Math.Min(Close[0] - .0005, GetCurrentBid(1)-.0005), "ShortEntry");
GT
Comment
-
No. It depends where you place the line. If you place it in the 1min context it will evaluate it when you are in that bars context. If you place it in the 5min, then it will evaluate there.
If you want it to evaluate immediately just use CalculateOnBarClose = false. Your strategy will evaluate on every single tick. The 1min and 5min will both be evaluated on every tick.Josh P.NinjaTrader Customer Service
Comment
-
Is it possible to set CalculateOnBarClose = false but still only look at the close values for the indicators and highs/lows. I like the idea for the entry order but I still would like to evaluate the indicators based on there close values not there intra-bar value. Thanks!
GT
Comment
-
How would this work then? I set CalculateOnBarClose = false, then use
if (FirstTickOfBar)
{
if (Close[1] < EntryLevel && Low = Close[1]-.0005)
entryOrder = EnterShort(0,1,"ShortEntry);
}
I changed the code from a stop order to a market order upon hitting a predetermined level. But how do I get the entryOrder outside of code above so it is calculated tick by tick? I think I am getting the idea but still unsure on how to make it happen. Thank you for your patience!
GT
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
563 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
329 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
547 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
548 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment