Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Communication and synchronization between two indicators

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

    Communication and synchronization between two indicators

    Hi
    I design a chart which will contain two indicators: IndA and IndB.
    IndA is complex indicator which computes per bar variables A1 and A2 (it does much more but it is irrelevant here ).
    IndB should be another indicator which calculate a value B1 per bar. B1 is computed based on the corresponding values A1 and A2 and some internal logic (i.e. A1, A2, B1 relates to the same bar). Indicator B plot on the chart the value B1 per bar.
    I assume InbB will activate somehow a method of IndA with input parameter BarNumber and output parameters A1 and A2 .
    However, the given BarNumber might not exist yet in IndA.
    Can you help me how to build the communication and synchronization between the two indicators?
    Last edited by doron; 06-06-2016, 06:33 AM.

    #2
    Hello doron,

    Thank you for your patience.

    When calling another indicator from within an indicator or strategy it should result in the needed data loading for that indicator. You should not need to do anything other than call the indicator to ensure the data is available.

    In general, you use a plot and call that from the other indicator or strategy. However, if these are not plots (A1 and A2 in your example) and are just variables (such as doubles) you would need to ensure they are updated. We have a reference sample demonstrating calling values that are not plots and also showing how to update values that do not belong to a series. You can find this sample at the following link: http://ninjatrader.com/support/forum...ead.php?t=4991

    Please let me know if you have any questions.
    Last edited by NinjaTrader_PatrickH; 06-06-2016, 12:45 PM.

    Comment


      #3
      thx
      The code you send can not be imported

      attach the errore messages
      Attached Files

      Comment


        #4
        Hello doron,

        We will update the thread.

        You can change the IsExitOnCloseStrategy to IsExitOnSessionCloseStrategy and ExitOnCloseSeconds to ExitOnSessionCloseSeconds.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Kaledus, Today, 01:29 PM
        0 responses
        3 views
        0 likes
        Last Post Kaledus
        by Kaledus
         
        Started by PaulMohn, Today, 12:36 PM
        1 response
        15 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by yertle, Yesterday, 08:38 AM
        8 responses
        36 views
        0 likes
        Last Post ryjoga
        by ryjoga
         
        Started by rdtdale, Today, 01:02 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by alifarahani, Today, 09:40 AM
        3 responses
        18 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X