protected override void OnMarketData(Data.MarketDataEventArgs marketDataUpdate) { if (marketDataUpdate.IsReset) CurrentValue = double.MinValue; else if (marketDataUpdate.MarketDataType == Data.MarketDataType.LastClose) CurrentValue = marketDataUpdate.Price * SharesOutstanding(); }
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!
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
NinjaTrader
Calling an existing Market Analyzer column
Collapse
X
-
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: -
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
-
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
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by frankthearm, Yesterday, 09:08 AM
|
14 responses
47 views
0 likes
|
Last Post Today, 02:19 PM | ||
Is it possible to have a drawing, such as a line, cycle through different colors?
by gentlebenthebear
Started by gentlebenthebear, Today, 01:30 AM
|
2 responses
13 views
0 likes
|
Last Post Today, 02:05 PM | ||
Started by Kaledus, Today, 01:29 PM
|
2 responses
9 views
0 likes
|
Last Post
by Kaledus
Today, 02:04 PM
|
||
Started by PaulMohn, Today, 12:36 PM
|
2 responses
17 views
0 likes
|
Last Post
by PaulMohn
Today, 01:48 PM
|
||
Started by Conceptzx, 10-11-2022, 06:38 AM
|
2 responses
56 views
0 likes
|
Last Post
by PhillT
Today, 01:47 PM
|
Comment