Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Execute At Open
Collapse
X
-
Hello siroki,
Thank you for your response.
There a few items your inquiry could relate to. May we ask for further clarification?
Please answer the following questions.
Are you looking for the calculation of your logic to be performed only the Open as opposed to the Close?
Are you looking to have the executions only occur on the Open of the bar and never after or on the Close?
Are you looking for an intra-bar calculation much like running in real-time or Tick Replay?
I look forward to your response.
Comment
-
Ideally I would like to be flexible in binding the entry/exit to open/close.. So for example: I would like to have a strategy where the exit is based on the Open of a candle and the Exit is based on the Close of a candle.
But to have at least have an Entry based on the Open of a candle would be great. The whole problem is when testing stock strategies, the close of a candle does not mean you can enter the stock at the closing price. Especially in daily strategies where you can have gaps.
Comment
-
But how does that work? Because once a candle close, you know the Close and the Open of that particular candle. If you EnterLongLimit(Open[0]), aren't you trying to enter the instrument at the Open price of the candle that just closed?
Furthermore, I want to measure certain indicators at moment the candle opens. And if the criteria are met, then enter immediately at the open.
Comment
-
Hello,
You are correct, in a Backtest that would be the last closed candle, the code below would do what you are asking, but only in realtime and with CalculateOnBarClose set to false.
Originally posted by NinjaTrader_PatrickH View PostSo something like the following?
Code:if(Close[0] > Open[0]) EnterLongLimit(Open[0]);
NinjaTrader has no way of changing the Calculation to Open instead of Close of the bar so using a Tick series would be the only way to do this in a backtest.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Nickgiaco, 02-26-2024, 10:23 AM
|
2 responses
70 views
0 likes
|
Last Post Today, 05:12 AM | ||
Started by Johndc, Today, 04:39 AM
|
0 responses
2 views
0 likes
|
Last Post
by Johndc
Today, 04:39 AM
|
||
Started by johntraderuser2, Today, 02:34 AM
|
0 responses
8 views
0 likes
|
Last Post Today, 02:34 AM | ||
Started by IanS00, 03-27-2024, 11:24 AM
|
2 responses
13 views
0 likes
|
Last Post Today, 02:00 AM | ||
Started by Mariawilcoxi, Today, 01:32 AM
|
0 responses
5 views
0 likes
|
Last Post
by Mariawilcoxi
Today, 01:32 AM
|
Comment