• 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

Strategy Info via Dot Operator

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

    Strategy Info via Dot Operator

    Sometimes I want my custom indicators to access data that is produced by a strategy. Is it possible to do that using a "dot' operator ? (I want to keep the code as simple as possible.)

    #2
    Hello spottysallrite,

    Thanks for the post. The answer to this is in the thread from yesterday:

    https://ninjatrader.com/support/foru...d.php?t=110326

    Actually, the most straightforward way of doing this would be to move or clone the logic from the strategy to the indicator. In general, a strategy should be designed to take only inputs from indicators and never be mutable by anything else.

    Edit:
    You might find this reference sample useful. It shows how you can plot from within a strategy.

    https://ninjatrader.com/support/help..._a_ninjasc.htm

    Please let me know if I may be of any further assistance.
    Last edited by NinjaTrader_ChrisL; 06-19-2018, 07:42 AM.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Why would a strategy be mutated if it provided info to an indicator ?

      Comment


        #4
        Hello spottysallrite,

        Thanks for the reply.

        Unless the class was designed to be immutable as described below, it could run the risk of mutability.

        https://www.codeproject.com/Articles...ects-in-Csharp

        If you could write a problem description and provide some code samples, I would be happy to advise on a plan of action that could be taken which is specific to the issue.
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by PatrickM, Yesterday, 08:43 PM
        1 response
        17 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by NickyD, Today, 09:20 AM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Started by UncleRyan, Yesterday, 08:18 PM
        2 responses
        11 views
        0 likes
        Last Post UncleRyan  
        Started by Plaket, Today, 08:58 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_BrendanC  
        Started by trader333, Today, 08:51 AM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X