Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
CalculateOnBarClose?
Collapse
X
-
Originally posted by kinkeadfx View PostI understand when using automated strategies with CalculateOnBarClose set to True that your orders are placed at the close of the bar, but when set to False where do the orders get filled?
EntriesPerDirection can limit that to only 1 order, so you don't send thousands of orders.
-
kinkeadfx, what orders types are you working with here? You are correct in understanding that with CalculateOnBarClose = true the OnBarUpdate() is only called when the bars are closed, that happens in NT when the open tick of the next bar was seen and this would be the first point you could trade at - so the open and closing tick are essentially the same.BertrandNinjaTrader Customer Service
Comment
-
Originally posted by kinkeadfx View PostWhen backtesting on Ninjatrader how does it calculate its results? I usually see where trades were placed at the open of the bar, can this be a result of CalculateOnBarClose set to False?
Comment
-
Originally posted by kinkeadfx View PostOk so when using CalculateOnBarClose set to False on automated strategies, do the indicators used in the strategy need to be set to False as well so that everything works right?BertrandNinjaTrader Customer Service
Comment
-
Originally posted by kinkeadfx View PostOk so when using CalculateOnBarClose set to False on automated strategies, do the indicators used in the strategy need to be set to False as well so that everything works right?
However, even if you do use a COBC directive in the indicator, you can always set COBC false for the indicator every time that you call the indicator from the strategy. After all, it is just a property of the indicator object. In that case, it is best to use a named instance. Heck, it is always best to use a named instance.
Comment
-
Originally posted by kinkeadfx View PostHow could i get my entry order to open on the first tick of the next bar after the strategy gives a signal?
Real time, that is the behavior if CalculateOnBarClose is true. In backtest, depending on how your signal is validated, it might work that way, or you might need to use a multi-timeframe script that uses a finer granularity barSeries, (1-tick or 1-range), to place orders that are triggered on the higher timeframe barSeries.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by ETFVoyageur, Today, 06:05 PM
|
0 responses
2 views
0 likes
|
Last Post
by ETFVoyageur
Today, 06:05 PM
|
||
Started by TAJTrades, 04-28-2024, 09:46 AM
|
2 responses
17 views
0 likes
|
Last Post
by TAJTrades
Today, 05:35 PM
|
||
Started by ETFVoyageur, Today, 02:04 PM
|
2 responses
18 views
0 likes
|
Last Post
by ETFVoyageur
Today, 04:55 PM
|
||
Started by mjbatts91, Today, 04:48 PM
|
0 responses
4 views
0 likes
|
Last Post
by mjbatts91
Today, 04:48 PM
|
||
Started by 1001111, Today, 09:45 AM
|
2 responses
21 views
0 likes
|
Last Post
by 1001111
Today, 04:35 PM
|
Comment