Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy with custom indicator

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

    Strategy with custom indicator

    I'm trying to make strategy with custom indicator in NT 6.5 (I have cs and dll files in Custom directory).
    This indicator draws graph perfectly, but it's hard to build strategy with it.
    Indicator has Values[] datasets with double type values.
    Sometime dataset values is undefined and then these values equals to Close[0]!
    Not zero, not -1, not null. Why?
    How I can check that indicator.Values[0][0] is undefined?
    I think expression Values[0][0] == Close[0] is not very good solution.

    #2
    Hello none1,

    Welcome to the NinjaTrader forums!

    You can use ContainsValue() to make sure there is a valid value for the plot. This sample can help with this:
    Ensuring indicator plots are valid before programmatically accessing them
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by cmoran13, Yesterday, 01:02 PM
    0 responses
    27 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    18 views
    0 likes
    Last Post PaulMohn  
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    160 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    95 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    148 views
    2 likes
    Last Post CaptainJack  
    Working...
    X