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
-
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 Perr0Grande, Today, 08:16 PM
|
0 responses
2 views
0 likes
|
Last Post
by Perr0Grande
Today, 08:16 PM
|
||
Started by elderan, Today, 08:03 PM
|
0 responses
5 views
0 likes
|
Last Post
by elderan
Today, 08:03 PM
|
||
Started by algospoke, Today, 06:40 PM
|
0 responses
10 views
0 likes
|
Last Post
by algospoke
Today, 06:40 PM
|
||
Started by maybeimnotrader, Today, 05:46 PM
|
0 responses
11 views
0 likes
|
Last Post Today, 05:46 PM | ||
Started by quantismo, Today, 05:13 PM
|
0 responses
7 views
0 likes
|
Last Post
by quantismo
Today, 05:13 PM
|
Comment