Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
CalculateOnBarClose = false
Collapse
X
-
You could look into simulating those conditions on a lower timeframe series thus to be able to look inside that bigger timeframe bar. For order submission and fills, you can send them as well to a finer series - we have a reference sample to demonstrate this technique - http://www.ninjatrader.com/support/f...ead.php?t=6652
-
Thanks for the reply. Is there anything I can do then in back testing to enable me to test when setting is false.
Leave a comment:
-
Correct, in backtesting there would be no option to set CalculateOnBarClose to false, thus it would be true all the times as historical data is processed. Even if you set this in your code, the processing for that part of the data is still CalculateOnBarClose == true.
Leave a comment:
-
Hi Bertrand,
Apologies I do not follow what you have explained.
I am in the strategy analyser and in the toolbar that appears on right, there is no CalculateOnBarClose field.
Leave a comment:
-
fiddy, if you don't see the UI option for CalculateOnBarClose - are you in the backtesting engine then as this is seen? Here there would be no option to work on any other CalculateOnBarClose then true, as per default the intrabar formation of the bars would not be known.
Leave a comment:
-
In the UI I cannot see a CalculateonBarClose Option
Below is the code I have so far, which is waiting to the next bar
Should I be using something other than CLOSE[0]
protectedoverridevoid Initialize()
{
ExitOnClose = true;
CalculateOnBarClose = false;
DefaultQuantity = 100;
}
///<summary>
/// Called on each bar update event (incoming tick)
///</summary>
protectedoverridevoid OnBarUpdate()
{
if (Bars.FirstBarOfSession)
{
LowSupport = PriorDayOHLC().PriorLow[0];
HighResistance = PriorDayOHLC().PriorHigh[0];
}
// Condition set 1
if (CurrentDayOHL().CurrentOpen[0] < LowSupport
&& Close[0] > LowSupport)
{
EnterLong(DefaultQuantity, "");
Leave a comment:
-
fiddy, and when you check the UI parameters of the running strategy, it's still set to false correct?
Do you have any logic in FirstTickOfBar?
What indicator do you call in your script? Any custom ones that might have the COBC setting explicitly set in their own Initialize() as well?
Leave a comment:
-
CalculateOnBarClose = false
I have set CalculateOnBarClose = false within the strategy code
yet when I run the strategy the entry signals are not being generated until the start of the next bar.
Is there anything else which could be impacting this?Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by alifarahani, Today, 09:40 AM
|
4 responses
20 views
0 likes
|
Last Post
by alifarahani
Today, 02:41 PM
|
||
Is it possible to have a drawing, such as a line, cycle through different colors?
by gentlebenthebear
Started by gentlebenthebear, Today, 01:30 AM
|
3 responses
16 views
0 likes
|
Last Post Today, 02:41 PM | ||
Started by PhillT, Today, 02:16 PM
|
2 responses
7 views
0 likes
|
Last Post
by PhillT
Today, 02:33 PM
|
||
Started by Kaledus, Today, 01:29 PM
|
3 responses
11 views
0 likes
|
Last Post Today, 02:24 PM | ||
Started by frankthearm, Yesterday, 09:08 AM
|
14 responses
47 views
0 likes
|
Last Post Today, 02:19 PM |
Leave a comment: