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 charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    56 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    143 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    160 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    96 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    276 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X