• 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");
    }

  • NinjaTrader_Jim
    replied
    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.

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by mreanuzlazx, Today, 01:30 AM
0 responses
1 view
0 likes
Last Post mreanuzlazx  
Started by xinepev, Today, 12:33 AM
0 responses
4 views
0 likes
Last Post xinepev
by xinepev
 
Started by sun0781, Yesterday, 05:02 PM
0 responses
9 views
0 likes
Last Post sun0781
by sun0781
 
Started by ronhb107, 09-12-2019, 10:09 AM
4 responses
44 views
0 likes
Last Post Mr.Trader  
Started by rwilliam, Yesterday, 03:55 PM
0 responses
4 views
0 likes
Last Post rwilliam  
Working...
X