![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Sep 2009
Posts: 562
Thanks: 40
Thanked 4 times in 4 posts
|
can my strategy be on a CalculateOnBarClose = false?
Happy to keep the indicator running at CalculateOnBarClose though...but would like my entry and money management to run "live". |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
|
Hello,
Thanks for the note. You can however you want to code this into your strategy to reference it as COBC = false (You want all COBC to match or you will run into issues). Then only access the indicator balue on if (FirstTickOfBar) and store the value of the indicator you need for access on all other ticks so it is the same until the next bar close and use that in your COBC=false strategy. Let me know if I can be of further assistance.
Brett
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Sep 2009
Posts: 562
Thanks: 40
Thanked 4 times in 4 posts
|
Hi Brett,
Can FirstTickOfBar be used in hourly or minute bars? Alternatively, if COBC = true, when will Open[0] be calculated? At the start or the end of the current bar? Regards Kay Wai |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 89 times in 81 posts
|
Kay Wai, FirstTickOfbar can be used in hourly/minute charts, but I believe you need to do so with COBC = false.
If COBC = true, Open[0] will be calculated (revealed by the next OnBarUpdate()) at the close of the bar.
Austin
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Sep 2009
Posts: 562
Thanks: 40
Thanked 4 times in 4 posts
|
thanks austin
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Strategy.CalculateOnBarClose=true vs. Indicator.CalculateOnBarClose=false | karimatka | Strategy Development | 7 | 05-23-2011 03:39 AM |
| when is OnBarUpdate() called when the "CalculateOnBarClose" property is set to true? | clearpicks | General Programming | 1 | 12-12-2010 10:15 AM |
| CalculateOnBarClose = true; | gunsnmoney | Strategy Development | 1 | 03-05-2010 03:47 AM |
| CalculateOnBarClose = true; but its not? | ohowie | General Programming | 5 | 02-07-2008 09:49 PM |
| Indicator line goes to zero when CalculateOnBarClose set to True | ThePatientOne | Indicator Development | 1 | 08-30-2007 11:42 AM |