• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 NinjaScriptRenderBase).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 NW Trader, Today, 03:42 PM
    1 response
    2 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by ralett, Today, 01:42 PM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by Barry Milan, Today, 01:33 PM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by dkbyond, Yesterday, 04:11 PM
    1 response
    19 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by w0lverine, Yesterday, 08:22 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Working...
    X