Thanks
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Market Analyzer column question
Collapse
X
-
Market Analyzer column question
Hi..Is it possible to create within Market Analyzer a column that shows what percent last price is from 52 week high. i.e. 52 week high 100, last 95, column displays -5.00%.
ThanksTags: None
-
Hello derivtrader,
Thank you for the post.
Yes that is possible. As a starting point you could review the existing High52Weeks column in the NinjaScript editor. That would be how to get the 52 week high metric from a column. You could duplicate this script as well if you wanted to just start with that code in a script.
Next you would need to create a double variable and store the 52 week high.
Finally during the OnMarketData events you could observe the MarketDataType.Last events and during those events calculate the price using the variable and current market price. (See LastPrice column code).
The calculated value can then be set to CurrentValue.
I look forward to being of further assistance.
-
Jesse thank you for the reply. Unfortunately above my minimal programming knowledge. Was hoping for a solution using properties configuration.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
41 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
124 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
64 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
41 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment