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

Calling an existing Market Analyzer column

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

    Calling an existing Market Analyzer column

    I am creating a Column for MarketCap since my data vendor does not supply this information. What is the easiest way for me the call the value of another column from inside of my MarketAnalyzerColumn script? I am trying to get the value of the SharesOutstanding column like this:

    Code:
            protected override void OnMarketData(Data.MarketDataEventArgs marketDataUpdate)
            {
                if (marketDataUpdate.IsReset)
                    CurrentValue = double.MinValue;
                else if (marketDataUpdate.MarketDataType == Data.MarketDataType.LastClose)
                    CurrentValue = marketDataUpdate.Price * SharesOutstanding();
            }

    #2
    Hello swcooke,

    There is no means to communicate between columns like this, you would just need to include the SharesOutstanding calculation in your custom column.

    You can open the existing column to view its code and copy/paste it into yours. Following that you could make any modifications necessary to use the value how you wanted, for example you don't need to set CurrentValue to this value, you can make a variable for sharesoutstanding and then use it in your calculation that you have shown.



    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      That's easy enough, thanks!

      Just one follow up question: Are symbol lists available to scripts? In other words, is there a way to call a function which returns the 500 symbols of the S&P or perhaps returns the symbols that are currently part of the NYSE Top Losers hot list?

      Comment


        #4
        Hello swcooke,

        I am unaware of any way to gather an instrument list, currently there are no specific documented methods to do this.



        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by jclose, Today, 09:37 PM
        0 responses
        6 views
        0 likes
        Last Post jclose
        by jclose
         
        Started by WeyldFalcon, 08-07-2020, 06:13 AM
        10 responses
        1,414 views
        0 likes
        Last Post Traderontheroad  
        Started by firefoxforum12, Today, 08:53 PM
        0 responses
        11 views
        0 likes
        Last Post firefoxforum12  
        Started by stafe, Today, 08:34 PM
        0 responses
        11 views
        0 likes
        Last Post stafe
        by stafe
         
        Started by sastrades, 01-31-2024, 10:19 PM
        11 responses
        169 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Working...
        X