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