• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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 GLFX005, Today, 12:22 PM
        2 responses
        35 views
        0 likes
        Last Post NinjaTrader_Kate  
        Started by AspenHiker, Today, 08:37 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Kate  
        Started by MartinT, Yesterday, 01:12 PM
        3 responses
        15 views
        0 likes
        Last Post MartinT
        by MartinT
         
        Started by caveat_lector, Today, 11:58 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Heath  
        Started by Bionian, Today, 11:43 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Kate  
        Working...
        X