Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Operations with indicator values

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

    Operations with indicator values

    Hi,

    I would like to make operations with the values of indicators but it seem that it's not possible.

    For an operations like

    Dif = StdDev(14) - StdDev(7);

    I get the error "Operator "-" cannot be applied to operands of type Ninjatrader.Indicator.RSI" on compiling

    How to retrieve the value of indicators?

    #2
    guillembm, is Dif a double value here?

    For the indicators they return a dataseries, so try accessing a double value from them by accessing via an index value : Dif = StdDev(14)[0] - StdDev(7)[0];

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    24 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    121 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    179 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    92 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    136 views
    0 likes
    Last Post cmoran13  
    Working...
    X