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 arvidvanstaey, Today, 02:19 PM
        4 responses
        11 views
        0 likes
        Last Post arvidvanstaey  
        Started by samish18, 04-17-2024, 08:57 AM
        16 responses
        61 views
        0 likes
        Last Post samish18  
        Started by jordanq2, Today, 03:10 PM
        2 responses
        9 views
        0 likes
        Last Post jordanq2  
        Started by traderqz, Today, 12:06 AM
        10 responses
        18 views
        0 likes
        Last Post traderqz  
        Started by algospoke, 04-17-2024, 06:40 PM
        5 responses
        48 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X