Setting parameters is useless, as these values vary every session.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Backtest strategy - PIVOT points - settlement price variation every session
Collapse
X
-
Backtest strategy - PIVOT points - settlement price variation every session
Is there a way, i can backtest a strategy that is dependent upon settlement price, high and low of the previous day?
Setting parameters is useless, as these values vary every session.Tags: None
-
Hello GauthamK,
Thank you for your post.
You could code the strategy so that it programmatically accesses the settlement price, high, and low of the previous day. These values could then be used to set certain conditions that the strategy actions are based on. For the prior day high and low, I suggest checking out the logic in the Prior Day OHLC indicator that comes with NinjaTrader or even calling the values from that indicator in your script.
The prior day's settlement price could be accessed one of two ways. Some data providers send out a settlement-adjusted close price for daily bars, and others do not. This is noted in the final column of the Data by Provider grid here:
If your data provider does offer a settlement-adjusted close price for daily bars, you could add the daily bars to your strategy and access the Close price from the previous day. Otherwise, you could also utilize OnMarketData() updates. One of the data types received in OnMarketData() updates is MarketDataType.Settlement and that update could be used to get and save the settlement price from previous sessions. For more information:
Please let use know if we may be of further assistance.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
91 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
137 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
68 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
121 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
72 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment