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 MaupinFinche, Today, 05:08 AM
|
0 responses
2 views
0 likes
|
Last Post
by MaupinFinche
Today, 05:08 AM
|
||
Started by Enkidu, Yesterday, 06:40 AM
|
9 responses
35 views
0 likes
|
Last Post
by Enkidu
Yesterday, 01:11 PM
|
||
Started by Mestor, 03-10-2023, 01:50 AM
|
12 responses
307 views
0 likes
|
Last Post
by z.franck
Today, 04:29 AM
|
||
Started by AgriTrdr, 07-16-2023, 12:54 PM
|
32 responses
267 views
0 likes
|
Last Post
by f.saeidi
Yesterday, 06:49 AM
|
||
Started by Mestor, Today, 03:15 AM
|
0 responses
2 views
0 likes
|
Last Post
by Mestor
Today, 03:15 AM
|
Comment