![]() |
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 |
|
Member
Join Date: Nov 2010
Posts: 62
Thanks: 4
Thanked 2 times in 2 posts
|
Hi,
On a Strategy in 220 Tick When CalculateOnBarClose = true; if (Open[0] >= Close[0]) .... run good but when CalculateOnBarClose = false; if (Open[0] >= Close[0]) .... don't run good my question is in 220 Tick : with CalculateOnBarClose = false; how can I obtain the instant value of Open/Close in Tick and not the Close[0] Value thanks Pierre |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,414
Thanks: 252
Thanked 977 times in 960 posts
|
Hi Pierre, I'm sorry but don't follow your inquiry here - what outcome do you expect to seek in COBC = false mode? Is this for backtesting or realtime trading / simulation?
In backtesting COBC would always be 'true' - the strategy has access to the OHLCV info of the series per default only.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Nov 2010
Posts: 62
Thanks: 4
Thanked 2 times in 2 posts
|
my question is
in Realtime trading in 220 Tick : with CalculateOnBarClose = false; how can I obtain the INSTANT value of Open/Close in Tick and not the Close[0] Value |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,414
Thanks: 252
Thanked 977 times in 960 posts
|
Pierre, Close[0] in COBC = false is the current last value. The value of the previously closed bar would then Close[1]. Same would apply to the Open.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Member
Join Date: Nov 2010
Posts: 62
Thanks: 4
Thanked 2 times in 2 posts
|
OK so my problem is to get the INSTANT PnL
in COBC = false and 220 Tick how can I get the INSTANT PnL ? (and not the PnL at the end of 220 Tick) Thanks |
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,414
Thanks: 252
Thanked 977 times in 960 posts
|
Have you tried GetProfitLoss() with Close[0] as ref price and running on COBC = false?
http://www.ninjatrader.com/support/h...profitloss.htm
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CalculateOnBarClose = false question | richtobey | Automated Trading | 1 | 06-21-2011 01:54 PM |
| Strategy.CalculateOnBarClose=true vs. Indicator.CalculateOnBarClose=false | karimatka | Strategy Development | 7 | 05-23-2011 03:39 AM |
| CalculateOnBarClose = false\true | nkonkov | Strategy Development | 3 | 06-17-2010 03:28 AM |
| CalculateOnBarClose = false; | Rhyshaelkan | Indicator Development | 1 | 11-19-2009 03:42 PM |
| what really happens when calculateonbarclose = false | verge | Strategy Development | 9 | 07-28-2008 01:50 AM |