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.
JesseNinjaTrader Customer Service
-
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 volIQ, 03-27-2024, 04:28 PM
|
3 responses
21 views
0 likes
|
Last Post
by RJay
Today, 05:41 AM
|
||
Started by Nickgiaco, 02-26-2024, 10:23 AM
|
2 responses
72 views
0 likes
|
Last Post Today, 05:12 AM | ||
Started by Johndc, Today, 04:39 AM
|
0 responses
4 views
0 likes
|
Last Post
by Johndc
Today, 04:39 AM
|
||
Started by johntraderuser2, Today, 02:34 AM
|
0 responses
9 views
0 likes
|
Last Post Today, 02:34 AM | ||
Started by IanS00, 03-27-2024, 11:24 AM
|
2 responses
13 views
0 likes
|
Last Post Today, 02:00 AM |
Comment