NexusFi: Find Your Edge


Home Menu

 





Quick COBC NinjaTrader Question


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 3 posts (0 thanks)
    2. looks_two Big Mike with 2 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 max-td with 1 posts (0 thanks)
    1. trending_up 4,586 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 6 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,117

Some indicators should be exclusively used in CalculateOnBarClose = true setting, as

- the algorithm used may not be compatible with CalculateOnBarClose = false

- or the CPU load would be too high


A very brute way to achieve this would be to start OnBarUpDate() with the code snippet

 
Code
 
if (!CalculateOnBarClose) return;
and the indicator will display nothing with the false settings.


But is there anything more elegant, such as eliminating CalculateOnBarClose from the indicator dialogue settings?


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
[WTS] ATAS Lifetime ULTRA license – EU buyers only – …
Platforms and Indicators
Building a free browser DOM/SMC simulator - need some ad …
Platforms and Indicators
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
AI for Traders — Agents, Memory, Tools & Real-Worl …
Elite Quantitative GenAI/LLM
My Rant with AMP Futures
Trading Reviews and Vendors
 
  #3 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 R.I.P. 1977-2026 
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,669 since Jun 2009
Thanks Given: 33,669
Thanks Received: 102,599



Fat Tails View Post
Some indicators should be exclusively used in CalculateOnBarClose = true setting, as

- the algorithm used may not be compatible with CalculateOnBarClose = false

- or the CPU load would be too high


A very brute way to achieve this would be to start OnBarUpDate() with the code snippet

 
Code
 
if (!CalculateOnBarClose) return;
and the indicator will display nothing.


But is there anything more elegant, such as eliminating CalculateOnBarClose from the indicator dialogue settings?

You could force the issue in OnBarUpdate, thereby ignoring what the user selects.

 
Code
                            
if (!CalculateOnBarClose) CalculateOnBarClose = true; 

Mike




We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on X Visit my NexusFi Trade Journal Reply With Quote
  #4 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927

comment it out ( // CalculateOnBarClose) - this should work.
i saw this in indicators yet.

if it is faster then, i dont know.


max-td
Reply With Quote
  #5 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,117


max-td View Post
comment it out ( // CalculateOnBarClose) - this should work.
i saw this in indicators yet.

if it is faster then, i dont know.

If I comment it out it will just be ignored but not compensate a false user setting.

Honestly, I don't undertstand this answer.


Started this thread Reply With Quote
  #6 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,117


Big Mike View Post
You could force the issue in OnBarUpdate, thereby ignoring what the user selects.

 
Code
                            
if (!CalculateOnBarClose) CalculateOnBarClose = true; 

Mike

Will try that, if it works, it is a good solution.

NT users are by now already used that is not up to them to select the features, so nobody will complain about it.


Started this thread Reply With Quote
  #7 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 R.I.P. 1977-2026 
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,669 since Jun 2009
Thanks Given: 33,669
Thanks Received: 102,599


Fat Tails View Post
Will try that, if it works, it is a good solution.

NT users are by now already used that is not up to them to select the features, so nobody will complain about it.

Sure. If you are really kind, you could throw an Alert letting the user know you changed it and why.

Mike




We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on X Visit my NexusFi Trade Journal Reply With Quote




Last Updated on December 6, 2010


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts