I have daily OHLCV data of BANKNIFTY (any scrip, for that matter) and I also have a basic strategy like a MA Crossover. I wish to enter the strategy such that it enters a trade at the EOD price, rather than at the next day's Open. Is this possible? I understand that this effectively means checking the EOD data for conditions of entry/exit, and then assuming that the entry should've happened at that price. But is there a way to do it?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Executing a trade at EOD price.
Collapse
X
-
Executing a trade at EOD price.
Hi,
I have daily OHLCV data of BANKNIFTY (any scrip, for that matter) and I also have a basic strategy like a MA Crossover. I wish to enter the strategy such that it enters a trade at the EOD price, rather than at the next day's Open. Is this possible? I understand that this effectively means checking the EOD data for conditions of entry/exit, and then assuming that the entry should've happened at that price. But is there a way to do it?Tags: None
-
Hello eey0069,
Thank you for your inquiry.
To clarify, what do you have the CalculateOnBarClose property on your strategy set to?
With this set to true, any logic inside of the OnBarUpdate() method will execute once a bar closes. Additionally, any executions appearing on the chart will display upon the opening of the next bar, however, they occur when the previous bar closes.
With this property set to true, Close[0] will obtain the end-of-bar price, or end-of-day price in terms of daily bars.
You can then utilize this price for your trade logic which will execute at the close of the bar.
More information about the CalculateOnBarClose property can be found in the NinjaTrader help guide at this link: http://ninjatrader.com/support/helpG...onbarclose.htm
More information about the Close collection can be found in the NinjaTrader help guide at this link: http://ninjatrader.com/support/helpG...nt7/?close.htm
Please, let us know if we may be of further assistance.Zachary G.NinjaTrader Customer Service
-
Hello eey0069,
With calculate on bar close enabled, any logic that you have for your script will execute on the close of each bar. However, the actual executions plotted on your chart will appear on the newly opened bar.
Please click on Tools -> Edit NinjaScript -> Strategy. Select your strategy and click on OK.
This will bring up the Edit Strategy window. Click Next.
Is the Calculate on bar close setting checked or unchecked?Zachary G.NinjaTrader Customer Service
Comment
-
If you want to specify the price at which an order is to execute, you use a Limit Order at the price that you want, so just issue a Limit Order at the correct price.Originally posted by eey0069 View PostHi,
I have daily OHLCV data of BANKNIFTY (any scrip, for that matter) and I also have a basic strategy like a MA Crossover. I wish to enter the strategy such that it enters a trade at the EOD price, rather than at the next day's Open. Is this possible? I understand that this effectively means checking the EOD data for conditions of entry/exit, and then assuming that the entry should've happened at that price. But is there a way to do it?
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
84 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
47 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
29 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
32 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
66 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment