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 NullPointStrategies, 03-13-2026, 05:17 AM
|
0 responses
99 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
154 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
82 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
55 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
72 views
0 likes
|
Last Post
|

Comment