Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Displaying historical trades - not executed

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

    Displaying historical trades - not executed

    When enabling a strategy I would like to be able see the trades on the chart the strategy would have taken if running live.

    This was working previously but now it seems rather random if at all.

    I have "text and marker" enabled in the data series. I tried using tick replay.

    Some of the strategies have multiple time frames, not sure if that is a problem.

    I saw this question in a previous post and the person asking the question said they had to reset the db (data base).

    Any help is appreciated.

    #2
    Hello sdauteuil,

    Thanks for your post.

    Here are the requirements to see strategy historical trades:

    1) The chart must be on the same account as the strategy (you can set this in the chart trader).
    2) The strategy must be applied to the chart (it cannot be created in the strategy tab as no chart would be associated with it).
    3) In the data series of the chart, the plot executions must be enabled for text and markers or markers only.
    4) The strategy code itself must not be prevented from performing historical trades (do you have if (state == State.Historical) return; or something similar in your code?

    Paul H.NinjaTrader Customer Service

    Comment


      #3

      In state == State.Historical

      I have some code for creating a button to enable the strategy.

      Which obviously has to be enabled for the strategy to place trades.
      I removed that from the logic and the trades appeared.

      I guess it was a little to obvious for me to figure out.

      Thanks

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by bortz, 11-06-2023, 08:04 AM
      47 responses
      1,603 views
      0 likes
      Last Post aligator  
      Started by jaybedreamin, Today, 05:56 PM
      0 responses
      8 views
      0 likes
      Last Post jaybedreamin  
      Started by DJ888, 04-16-2024, 06:09 PM
      6 responses
      18 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by Jon17, Today, 04:33 PM
      0 responses
      4 views
      0 likes
      Last Post Jon17
      by Jon17
       
      Started by Javierw.ok, Today, 04:12 PM
      0 responses
      12 views
      0 likes
      Last Post Javierw.ok  
      Working...
      X