Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Read existing indicator values

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

    Read existing indicator values

    Hello,

    I have a few indicators added to my chart. For example: RSI, Momentum, Bollinger and 2 custom indicators. If I want to read the value of each of these indicators, how would I access them from a C# based custom indicator (in the OnBarUpdate() method)?

    I am interested in retrieving the current value of each of the indicator for every single tick. Every single indicator is showing in the data box.

    Please help.

    Thanks

    #2
    Welcome to our forums - you can directly call the indicator method in your custom script, for example

    double upperValue = Bollinger(2, 20).Upper[0];

    will get you the Upper value of the 20 period 2 deviation Bollinger Bands.

    Similiar for your other studies including the custom indicators, if you want to process on each tick in realtime or replay, just run the calling study with CalculateOnBarClose set to false.

    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by PaulMohn, Today, 03:49 AM
    0 responses
    3 views
    0 likes
    Last Post PaulMohn  
    Started by inanazsocial, Today, 01:15 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by rocketman7, Today, 02:12 AM
    0 responses
    10 views
    0 likes
    Last Post rocketman7  
    Started by dustydbayer, Today, 01:59 AM
    0 responses
    2 views
    0 likes
    Last Post dustydbayer  
    Started by trilliantrader, 04-18-2024, 08:16 AM
    5 responses
    23 views
    0 likes
    Last Post trilliantrader  
    Working...
    X