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 f.saeidi, Yesterday, 02:09 PM
    3 responses
    19 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Jltarrau, Today, 05:57 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by kujista, Today, 06:23 AM
    0 responses
    2 views
    0 likes
    Last Post kujista
    by kujista
     
    Started by traderqz, Yesterday, 04:32 PM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by f.saeidi, Today, 05:56 AM
    1 response
    6 views
    0 likes
    Last Post Jltarrau  
    Working...
    X