Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Test strategy on custom chart template

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

    Test strategy on custom chart template

    Hi,

    I wrote a strategy and I want to run a backtest. I used the Strategy Analyzer and it shows the result on the Chart that is basic. I have my own template for the Chart that uses different indicators. I want to see the results of the strategy not on the default chart but on mine - custom. How can I do it?

    When in Strategy Analyzer I change the chart template, I got information that changing the template will remove all strategies from the chart.

    For the playback - I change the connection to playback and try to run the strategy so I can see the results but I cannot start the strategy so I can see entries and exits on the chart - maybe you have some guideline.
    Attached Files

    #2
    Hi iskier, thanks for your question. Loading a template will remove the strategy but you can right click the chart>go to Indicators and manually load each indicator and this will be prevented. Unfortunately, it is not possible to get executions from the NinjaTrader database through a script so you would need to custom render the entry/exit points from within your strategy using your own data structure for execution storage and use drawing tools or the OnRender method to display it.

    Comment


      #3
      Hi, thanks for the feedback. i have got 3 indicators, 2 additional panels so if I must do it every time I run new version of the strategy test, it's massive additional work. It would be crazy. Or maybe I can set it once and then it is remembered as a default one?

      The second part of the own data structure - I don't understand it.

      Comment


        #4
        Hi iskier, Unfortunately this is the way indicators need to be added to the chart. To expand a little more about the data structure for storing executions, you would use a C# Key/Value pair to store the date and price of each execution captured in OnExecutionUpdate and from this data you can plot this out manually.

        Comment


          #5
          can I use my own template and use the playback and start the strategy to see all entries? Can you guide me?

          Comment


            #6
            Hi, you can use chart templates in a chart while using the playback connection. Load a chart, then load a template, then enable your strategy on this chart.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Yesterday, 05:17 AM
            0 responses
            56 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            132 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            73 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            45 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            49 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X