Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

subscribe to Strategy Event from Add-On or indicator

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

    subscribe to Strategy Event from Add-On or indicator

    Hello,

    I have a strategy that calculates combination of signals (multi-timeframe) - and can output or plot signal on chart (Strategy doesn't place orders).
    I want my custom add-on to detect (ideally I want strategy to send an event and for add-on to be able to read that event through memory and not through txt file) - and the instant when that signal occurs - I want add-on to detect it.

    Do you have any samples/guidelines/suggestions on how to accomplish it?

    The other sub-question - let's say I have "Shark Indicators BloodHound" painting entry long/short signals on the chart. What is the best way for add-on to connect to this chart and detect the moment that dataseries/plot/property of this indicator just got updated in real-time?

    Basically I have to questions:
    1. One-way communication from strategy to add-on (add-on subscribed to events posted by the strategy, but also being able to unsubscribe if strategy is disabled or just manually unsubscribe from that event). Maybe add-on can loop through all strategies that are enabled, and be able to select to which strategy to subscribe...
    2. Connect add-on to specific chart and being able to determine the exact millisecond when X indicator plots Y value in its plot property.

    Thanks
    Last edited by music_p13; 12-11-2021, 08:53 PM.

    #2
    Hello music_p13,

    Strategies are intended to place orders.

    If you are wanting to plot instead and not place orders, I would recommend making this an indicator.

    There are not any supported methods for sending a signal to an addon, but undocumented / unsupported you could use a static variable.
    https://ninjatrader.com/support/foru...245#post712245

    Or give the indicator instance to the addon.
    https://ninjatrader.com/support/foru...686#post492686

    I recommend reaching out to shark indicators for assistance using their software.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by music_p13 View Post
      Hello,

      I have a strategy that calculates combination of signals (multi-timeframe) - and can output or plot signal on chart (Strategy doesn't place orders).
      I want my custom add-on to detect (ideally I want strategy to send an event and for add-on to be able to read that event through memory and not through txt file) - and the instant when that signal occurs - I want add-on to detect it.

      Do you have any samples/guidelines/suggestions on how to accomplish it?

      The other sub-question - let's say I have "Shark Indicators BloodHound" painting entry long/short signals on the chart. What is the best way for add-on to connect to this chart and detect the moment that dataseries/plot/property of this indicator just got updated in real-time?

      Basically I have to questions:
      1. One-way communication from strategy to add-on (add-on subscribed to events posted by the strategy, but also being able to unsubscribe if strategy is disabled or just manually unsubscribe from that event). Maybe add-on can loop through all strategies that are enabled, and be able to select to which strategy to subscribe...
      2. Connect add-on to specific chart and being able to determine the exact millisecond when X indicator plots Y value in its plot property.

      Thanks
      1) Put custom indicator/strategy to all charts, you need to watch for
      2) These indicator/strategy must find chart objects from the chart, that are related to needed indicators
      3) Every tick or every bar close get needed values from indicators (possibly using Reflection)
      4) Transmit to your add-on signals by any reasonable way (you mentioned in examples or use sockets or use some static objects)

      Comment


        #4
        Has anyone tried reactive extensions (or any other method)? Basically integrating them into Add-On and into custom strategy or indicator, and then being able to subscribe from Add-on to that custom strategy/indicator?
        Was thinking that could be the most fastest/efficient/robust solution...

        Here is a sample: https://www.c-sharpcorner.com/Upload...ve-extensions/

        so basically to reference library from both add-on and strategy, etc...

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ScottWalsh, 04-16-2024, 04:29 PM
        7 responses
        34 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by cls71, Today, 04:45 AM
        0 responses
        3 views
        0 likes
        Last Post cls71
        by cls71
         
        Started by mjairg, 07-20-2023, 11:57 PM
        3 responses
        214 views
        1 like
        Last Post PaulMohn  
        Started by TheWhiteDragon, 01-21-2019, 12:44 PM
        4 responses
        546 views
        0 likes
        Last Post PaulMohn  
        Started by GLFX005, Today, 03:23 AM
        0 responses
        3 views
        0 likes
        Last Post GLFX005
        by GLFX005
         
        Working...
        X