Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Export subclass of chartstyle OhlcStyle

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Export subclass of chartstyle OhlcStyle

    I created, in NinjaScript Editor, a new ChartStyle. This new ChartStyle I defined as a subclass of provided OhlcStyle and gave it some extra capabilities.

    It compiles and works fine.

    When I try to export it, using Tools->Export->NinjaScript Addon it fails with CS0246 "The type or namespace 'OhlcStyle' could not be found".
    I export as "source", not as a compiled assembly (which also fails).

    What is required to be able to export a custom ChartStyle?

    Thanks in advance for your help.

    #2
    Hello latam61,

    Thank you for your post.

    I don't believe this issue stems from the fact that it's a ChartStyle, I believe this has to do with a problem with creating said ChartStyle as a subclass of an existing ChartStyle. Using inheritence is not totally supported so you can run into issues like this from time to time when using subclasses.

    I would advise that instead of a subclass, you can open the OhlcStyle Chart Style in the NinjaScript Editior, right click on it and save a copy under its own name, then add your logic from your subclass to the existing code from the OhlcStyle ChartStyle. You should then be able to export the script properly.

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Frank1000, Today, 03:05 AM
    0 responses
    3 views
    0 likes
    Last Post Frank1000  
    Started by ntdev, Today, 01:14 AM
    4 responses
    15 views
    0 likes
    Last Post ntdev
    by ntdev
     
    Started by ct, Today, 02:22 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by yodaler, Yesterday, 06:12 PM
    4 responses
    12 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by sinpeople, 05-07-2021, 04:38 AM
    2 responses
    21 views
    0 likes
    Last Post hedgeplay  
    Working...
    X