Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator challenge

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

    Indicator challenge

    Elsewhere (http://ninjatrader.com/support/forum...ad.php?t=75726) I have described my need for an enhanced and more flexible approach to indicators so they may be invoked from a strategy using a specifiable DataSeries that has not been Added to the strategy. For example, if I have a strategy with three DataSeries (say ES, CL, TF), using this approach it would be possible to invoke an indicator for values on any other DataSeries that is not one of the three already added in the strategy (e.g. NQ).

    I know this is entirely unsupported in NT7 (although potentially doable in NT8 more easily, though probably still unsupported). However, I have been pointed to the Pivots indicator that uses GetBars to do something very similar, in NT7.

    So, for NT7, in the spirit of adventure and innovation, I decided to merge the Pivots approach with the ATR calculation on the received Bars from GetBars. The outcome is a work-in-progress, but it is certainly a reasonably close (though not yet perfect) analogue of Pivots stripped of the pivots and ATR calculated instead. The ATR values are not yet correct, but the bars returned are correct for the invocations I have been testing (i.e. GetBars returns the right bars on the right instrument at the requested period).

    I suspect the area where my attempt to merge these two indicators is still problematic, and hence not producing correct ATR values compared to "real" ATR on a "real" DataSeries of the type required, is in the merging of the actual ATR calculation. But I am at a loss to spot what is awry. Can't see the forest for the trees at this point.

    So, my request/challenge to any code gurus amongst the NT7 community: I attach the NT7 code as it is -- can you see what is wrong and provide the corrected code? Naturally, I am happy for the working code to be made available to all community members with appropriate attributions for any contributions made. At that point, migrating the working NT7 code to NT8 can also be done and the code made available for that community also.

    Looking forward to hearing from any knowledgeable soul who cares to see what they can do with it.

    Many (many!) thanks in advance to any takers for your efforts!
    Attached Files
    Last edited by jeronymite; 07-01-2015, 10:38 AM.
    Multi-Dimensional Managed Trading
    jeronymite
    NinjaTrader Ecosystem Vendor - Mizpah Software

Latest Posts

Collapse

Topics Statistics Last Post
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
0 responses
561 views
0 likes
Last Post Geovanny Suaza  
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
0 responses
325 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
547 views
1 like
Last Post RFrosty
by RFrosty
 
Working...
X