Go Back   NinjaTrader Support Forum > NinjaTrader 8 > Add-On Development

Add-On Development General NinjaScript development questions.

NinjaTrader
Reply
 
Thread Tools Display Modes
Old 05-28-2018, 10:53 AM   #16
aslane
Senior Member
 
Join Date: May 2006
Location: Madison
Posts: 440
Thanks: 22
Thanked 34 times in 31 posts
Default

If that is truly the case, NinjaTrader is fundamentally broken.
aslane is offline  
Reply With Quote
Old 05-28-2018, 11:00 AM   #17
NinjaTrader_ChelseaB
NinjaTrader Customer Service
 
NinjaTrader_ChelseaB's Avatar
 
Join Date: Dec 2012
Location: Denver, CO
Posts: 8,975
Thanks: 127
Thanked 1,971 times in 1,833 posts
Default

Hello aslane,

This is true with any c# code with overrides even if you were making your own application. It is a limitation of c#.

The base needs to be called for anything else that may be using the same override. This allows the method to also be called by the original base.

Not all methods need this, but they do when other methods are also overriding the same base method.

I would recommend further education in c# on overriding methods.

Futher, NinjaTrader is working as intended and as documented in the help guide. If you can demonstrate that when coding as directed that the behavior is not the intended behavior, we are happy to submit a bug report. However, we have not determined this at this time.
Last edited by NinjaTrader_ChelseaB; 05-28-2018 at 11:04 AM.
NinjaTrader_ChelseaB is offline  
Reply With Quote
Old 05-28-2018, 11:07 AM   #18
aslane
Senior Member
 
Join Date: May 2006
Location: Madison
Posts: 440
Thanks: 22
Thanked 34 times in 31 posts
Default

Quote:
Originally Posted by NinjaTrader_ChelseaB View Post
This is true with any c# code with overrides even if you were making your own application. It is a limitation of c#.

The base needs to be called for anything else that may be using the same override. This allows the method to also be called by the original base.

Not all methods need this, but they do when other methods are also overriding the same base method.

I would recommend further education in c# on overriding methods..

LOL, I think you might be the one that needs a little education.
aslane is offline  
Reply With Quote
Old 05-28-2018, 11:27 AM   #19
NinjaTrader_ChelseaB
NinjaTrader Customer Service
 
NinjaTrader_ChelseaB's Avatar
 
Join Date: Dec 2012
Location: Denver, CO
Posts: 8,975
Thanks: 127
Thanked 1,971 times in 1,833 posts
Default

Hello aslane,

Below are a few public links to 3rd party websites.
https://docs.microsoft.com/en-us/dot.../keywords/base
https://csharp.2000things.com/2013/0...u-override-it/
https://www.safaribooksonline.com/li...2/ch04s05.html

Can you further detail what I am not understanding correctly about calling the base method?
NinjaTrader_ChelseaB is offline  
Reply With Quote
Old 05-28-2018, 11:53 AM   #20
aslane
Senior Member
 
Join Date: May 2006
Location: Madison
Posts: 440
Thanks: 22
Thanked 34 times in 31 posts
Default

If that's all you got, keep googling and reading. I am done here as this is not productive use of time for either of us. In the time of this thread, I already rewrote the applicable portion of my lib to not use any Ninja built ins when doing custom renders.
aslane is offline  
Reply With Quote
Old 05-28-2018, 11:56 AM   #21
NinjaTrader_ChelseaB
NinjaTrader Customer Service
 
NinjaTrader_ChelseaB's Avatar
 
Join Date: Dec 2012
Location: Denver, CO
Posts: 8,975
Thanks: 127
Thanked 1,971 times in 1,833 posts
Default

Hello aslane,

When using the base.OnRender() as directed in the help guide are you finding that BackBrushes are not being rendered?

Do you have an issue to report?

Are you asking for some new language in the help guide that not calling base.OnRender() may or may not cause issues with other items that are also being rendered depending on the order they are rendered in?

Are you asking for the language to be changed to suggest that base.OnRender() should always be called to ensure other rendered items are rendered and remove the specific word about plots?
NinjaTrader_ChelseaB is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Replay Request to change behavior of Go To (or slider) bobwest Platform Technical Support 12 05-08-2018 06:15 AM
8.0.4.0 *Unusual OnRender behavior* jackyd Platform Technical Support 2 02-08-2017 05:20 PM
Accessing Custom Series within OnRender TheBarChartist Version 8 Beta 2 08-07-2016 08:05 PM
How to change Font in OnRender - TextLayout - in BarTimer indicator Taddypole Version 8 Beta 9 06-09-2016 03:09 PM
Calling Alert() in a custom drawing tool, during OnRender() neoikon Version 8 Beta 12 11-05-2015 11:05 AM


All times are GMT -6. The time now is 01:33 PM.

Futures, foreign currency and options trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results. View Full Risk Disclosure.

CFTC Rules 4.41 - Hypothetical or Simulated performance results have certain limitations, unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

This website is hosted and operated by NinjaTrader, LLC (“NT”), a software development company which owns and supports all proprietary technology relating to and including the NinjaTrader trading platform. NT is an affiliated company to NinjaTrader Brokerage (“NTB”), which is a NFA registered introducing broker (NFA #0339976) providing brokerage services to traders of futures and foreign exchange products. This website is intended for educational and informational purposes only and should not be viewed as a solicitation or recommendation of any product, service or trading strategy. No offer or solicitation to buy or sell securities, securities derivative or futures products of any kind, or any type of trading or investment advice, recommendation or strategy, is made, given, or in any manner endorsed by any NT affiliate and the information made available on this Web site is not an offer or solicitation of any kind. Specific questions related to a brokerage account should be sent to your broker directly. The content and opinions expressed on this website are those of the authors and do not necessarily reflect the official policy or position of NT or any of its affiliates. 

Vendors along with their websites, products and services, collectively referred to as (“Vendor Content”), are independent persons or companies that are in no manner affiliated with NT or any if its affiliates. NT or any of its affiliates are not responsible for, do not approve, recommend or endorse any Vendor Content referenced on this website and it’s your sole responsibility to evaluate Vendor Content. Please be aware that any performance information provided by a vendor should be considered hypothetical and must contain the disclosures required by NFA Rule 2-29(c). If you are interested in learning more about, or investigating the quality of, any such Vendor Content you must contact the vendor, provider or seller of such Vendor Content. No person employed by, or associated with, NT or any of its affiliates is authorized to provide any information about any such Vendor Content.