Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Add base class NinjaScriptRenderBase - for IndicatorRenderBase and StrategyRenderBase

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

    Add base class NinjaScriptRenderBase - for IndicatorRenderBase and StrategyRenderBase

    Indicator and Strategy have same base NinjaScriptBase, which shares most common methods and is useful to be used in external classes. So, when in indicator or strategy we have:

    Code:
    MyExternalMethod(this);
    we can easily access the shared method or property of that Indi or Strat, without need to change type, like i.e. `Print()` method:

    Code:
    public method MyExternalMethod(object xyz)
    {
       (xyz as NinjaScriptBase).Print("hello");
    }
    However, it would be nice that similar shared base existed for "IndicatorRenderBase" and "StrategyRenderBase".
    At this moment, many programmers, like me, use multiple lines of codes (from external classes) to achieve the simple thing

    Code:
    public method MyExternalMethod(object xyz)
    {
       if (xyz is Indicator)   (xyz as indicator).RemoveDrawObject("arrow");
       if (xyz is Strategy)   (xyz as Strategy).RemoveDrawObject("arrow");
    }

    so, just create `NinjaScriptRenderBase` base class for those two classes, so, we make things simpler:

    Code:
    public method MyExternalMethod(object xyz)
    {
       (xyz as NinjaScript[B]Render[/B]Base).RemoveDrawObject("arrow");
    }

    #2
    Hello TazoTodua,

    Thanks for your post.

    I have submitted your feature request with the ticket ID SFT-3863. As with other feature requests, we cannot offer an ETA or promise of fulfillment, but your interest is being tracked for consideration.

    If there is anything else we can do to help, please let us know.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by judysamnt7, 03-13-2023, 09:11 AM
    4 responses
    59 views
    0 likes
    Last Post DynamicTest  
    Started by ScottWalsh, Today, 06:52 PM
    4 responses
    36 views
    0 likes
    Last Post ScottWalsh  
    Started by olisav57, Today, 07:39 PM
    0 responses
    7 views
    0 likes
    Last Post olisav57  
    Started by trilliantrader, Today, 03:01 PM
    2 responses
    21 views
    0 likes
    Last Post helpwanted  
    Started by cre8able, Today, 07:24 PM
    0 responses
    10 views
    0 likes
    Last Post cre8able  
    Working...
    X