Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to run an indicator which uses manually drawn lines in Market Analyzer?

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

    How to run an indicator which uses manually drawn lines in Market Analyzer?

    Dear all,

    I am trying to filter certain indicator signals by initially checking whether price is close enough to manually drawn trendlines on my charts. So my indicator OnBarUpdate() starts with a clause

    Code:
     
    foreach (IDrawObject draw in DrawObjects)
    { 
        if (
        draw.UserDrawn &&
        draw.DrawType == DrawType.HorizontalLine 
        )
        { 
            //Is price close enough to this? If not just return from function, do nothing.
            (...)
        }
    }
    This works perfectly with individual charts once I manually add trendlines to them. However I would like to screen my entire asset universe in this way and so have tried this indicator within Market Analyzer (MA). I find that I never get any signal, and I assume that this is because MA instantiates a non customised Chart object i.e. sees an empty DrawObjects collection in the above block? Is that the case, and if so is there any way I can make MA access the exact Chart instances that I would see if manually opening a chart? Otherwise, can I achieve what I am trying to do in some other way?

    (Bonus question: is there any way to get debug output from the indicator instance running within MA?)

    Sorry if this has been covered before and thanks for your time.

    #2
    Hello hyperfish,

    There is not a supported method to be able to take in line objects inside of the Market Analyzer Window.

    You may use the Print() statement to view values inside of the Output window from the Market Analyzer just like you would the Chart.

    Let us know if we can be of further assistance.
    JCNinjaTrader Customer Service

    Comment


      #3
      Thanks for confirming JC,

      I would have preferred to find out I had missed an easy way to do this but you cannot have everything! I will have to try and hack something together using file I/O.

      And good to know you can normally debug indicators in MA - I had just assumed you couldn't.

      Thanks again...

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      566 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      330 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      547 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      548 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X