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];
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ageeholdings, Today, 07:43 AM
    0 responses
    6 views
    0 likes
    Last Post ageeholdings  
    Started by pibrew, Today, 06:37 AM
    0 responses
    4 views
    0 likes
    Last Post pibrew
    by pibrew
     
    Started by rbeckmann05, Yesterday, 06:48 PM
    1 response
    14 views
    0 likes
    Last Post bltdavid  
    Started by llanqui, Today, 03:53 AM
    0 responses
    6 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    12 views
    0 likes
    Last Post burtoninlondon  
    Working...
    X