Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Highlight settlement in Price column on DOM
Collapse
X
-
Hello funk101,
Thanks for your post.
It is possible but would require custom coding through an indicator that could be added to the Superdom, however as an indicator it could only place a line at the settlement price level. In the custom indicator, you would add daily bars and then plot the close value of the bar (which would be the settlement price as the daily bars are adjusted to show the close as the settlement price).
If I understand correctly you are wanting to shade the superdom cell similar to how the daily High/Low markers do. I will write a feature request to add this capability to the superdom. I will update this thread when I have further information on the feature request.
-
Getting a memory error on this "settlement" code...
Error:
Failed to call OnRender() for chart object 'Horizontal Line': 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'
Code:protected override void OnMarketData(MarketDataEventArgs m) { if (m.MarketDataType == MarketDataType.Settlement) settlement = m.Price; Value[0] = settlement; Draw.HorizontalLine(this, "settlement", settlement, Brushes.Goldenrod); }
Comment
-
Hello funk101,
Thanks for your post.
Move your plot and draw statements into OnbarUpdate().
Alternatively, to getting the settlement price in that manner, you can just add a day bar series and access the close price as the close price should = settlement price of the daily bars. You can verify if this is the case by comparing the close price of the bar with the exchanges settlement price for the instrument of interest.
Comment
-
Ok, so, this?
...and then this? (this gives me the wrong closing price. Please advise)Code:...else if (State == State.Configure) { AddDataSeries(BarsPeriodType.Day, 1); }
Code:protected override void OnBarUpdate() { double settlement = BarsArray[1].GetClose(0); Value[0] = settlement; Print ("settlement: "+settlement); Draw.HorizontalLine(this, "settlement", settlement, Brushes.Goldenrod); }
Comment
-
Hello funk101,
Thanks for your reply.
If you are using Calculate.OnBarClose, use: double settlement = Closes[1][0]; // get prior day close/settlement.
If you are using Calculate.OnEachTick or Calculate.OnPriceChange, use: double settlement = Closes[1][1]; // get prior day close/settlement.
GetClose() is intended for chart bars in OnRender.
References:
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
578 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
553 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment