• 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 jamarc, Today, 02:30 AM
    0 responses
    2 views
    0 likes
    Last Post jamarc
    by jamarc
     
    Started by rickyblah12, Yesterday, 08:17 PM
    0 responses
    6 views
    0 likes
    Last Post rickyblah12  
    Started by mrlucky1x, Yesterday, 08:07 PM
    0 responses
    2 views
    0 likes
    Last Post mrlucky1x  
    Started by uday12, Yesterday, 07:21 PM
    0 responses
    4 views
    0 likes
    Last Post uday12
    by uday12
     
    Started by voltlon, Yesterday, 05:18 PM
    0 responses
    8 views
    0 likes
    Last Post voltlon
    by voltlon
     
    Working...
    X