Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Backtest strategy - PIVOT points - settlement price variation every session

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    #2
    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.
    Emily C.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Nyman, Today, 02:27 PM
    0 responses
    3 views
    0 likes
    Last Post Nyman
    by Nyman
     
    Started by qewcool, Today, 10:26 AM
    2 responses
    23 views
    0 likes
    Last Post qewcool
    by qewcool
     
    Started by RISKYBUSINEZZ, Today, 09:07 AM
    4 responses
    33 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by tkaboris, Today, 08:30 AM
    3 responses
    19 views
    0 likes
    Last Post tkaboris  
    Started by DerkWehler, 07-15-2024, 11:35 AM
    19 responses
    57 views
    0 likes
    Last Post DerkWehler  
    Working...
    X