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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
87 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
47 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
66 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
69 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
59 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment