Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
built-in order safeguards
Collapse
X
-
boaza, if you want to use CalculateOnBarClose = false, this would be tick by tick simulation. It's your script design that dictates whether you would set this true / false.
Storing a value from OnMarketData() should not contribute to a significant performance hit.
-
Thanks Bertrand,
- By 'Simulation' I mean that currently I only simulate bar data. Is there a way I can avoid going to tick-by-tick simulation?
- As for storing the last bid/ask in OnMarketData() - any idea how would this effect execution performance in real time?
Leave a comment:
-
boaza, I'm not sure what exactly you mean with your simulator question - for the Bid / Ask values to compare it would be best if you stored them in OnMarketData() to variables which you would refer to in your OnExecution() then, those would hold then the last known bid / ask events.
Leave a comment:
-
Bertrand,
Using 'CalculateOnBarClose = false' is currently too big a shift for me.
I'm sending the stop order not in OnBarUpdate(), but in OnExecution(), as demonstrated here.- Can I still access the GetCurrentBid() and GetCurrentAsk() methods in OnExecution, even though 'CalculateOnBarClose = true'?
- How would the simulator behave in this case?
Leave a comment:
-
I'm assuming that by 'above the current market', you mean that for Sell stop orders, the stop price must be below the current bid, whereas for Buy stop orders, the price has to be above the current ask. Is that correct?
As for working with 'CalculateOnBarClose = false' - are there any implications besides having to shift indices of indicators by one? Can I still use multi-time frames?
Leave a comment:
-
Bertrand,
I'm assuming that by 'above the current market', you mean that for Sell stop orders, the stop price must be below the current bid, whereas for Buy stop orders, the price has to be above the current ask. Is that correct?
As for working with 'CalculateOnBarClose = false' - are there any implications besides having to shift indices of indicators by one? Can I still use multi-time frames?
Thanks,
Boaz
Leave a comment:
-
Boaz, limit orders can be marketable yes.
Stop orders need to be valid, meaning for a buy stop order it has to be placed above the current market or else it would be rejected.
For your scripts, work with CalculateOnBarClose = false and use GetCurrentBid / Ask for example, for logic to be executing on the close of the bar only, place it in FirstTickOfBar.
Leave a comment:
-
Bertrand,
I'd be happy if you could elaborate:- What do you mean by 'fits as needed'? What are the legal/illegal boundaries for stop loss orders in live and in simulation?
- Is it possible to access the current bid/ask prices in live, while the strategy has CalculateOnBarClose is true?
- Are there any corresponding rules for Limit orders? Is it valid to place 'marketable' limit orders, namely orders which can be filled immediately?
Thanks,
Boaz
Leave a comment:
-
Boaz, you would need to check your stop orders against the current inside market (bid / ask) to ensure the order price fits as needed and would not be rejected. If you like to deal with rejections liks those in your code, then the realtime error handling could be turned off (http://www.ninjatrader.com/support/h...orhandling.htm)
Leave a comment:
-
built-in order safeguards
Hi,
I just got the following message:
**NT** A BuyToCover stop order placed at '12/07/2011 22:01:00' has been ignored since the stop price is less than or equal to the close price of the current bar. This is an invalid order and subsequent orders may also be ignored. Please fix your strategy.
My question is where I can find the set of rules by which NT determines that an order is invalid?
I would like to problematically check for those before sending any orders.
Many thanks,
Boaz
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by adeelshahzad, Today, 11:49 AM
|
0 responses
1 view
0 likes
|
Last Post
by adeelshahzad
Today, 11:49 AM
|
||
Started by spottysallrite, Today, 11:31 AM
|
1 response
4 views
0 likes
|
Last Post Today, 11:43 AM | ||
Started by johnMoss, 03-04-2024, 01:53 PM
|
2 responses
31 views
0 likes
|
Last Post
by Overnhou
Today, 11:21 AM
|
||
Started by Padan, Today, 02:02 AM
|
5 responses
17 views
0 likes
|
Last Post Today, 11:14 AM | ||
Started by Lele2k24, Yesterday, 11:24 AM
|
8 responses
28 views
0 likes
|
Last Post
by Lele2k24
Today, 11:00 AM
|
Leave a comment: