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

Ninjatrader 7 and strategy behaviour

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

    Ninjatrader 7 and strategy behaviour

    Hi All,

    I need to know how exactly NT 7 behaviour is in the following situation:

    I settled up into Tools -> Options -> Strategies -> NinjaScript " Immediately submit live working historical orders " , so if at this point one strategy has Position " void " means no open short / long entry and the virtual profit reached already counted into " Realized " column, if I stop it cancelling the flag into the " enable " field, when I re-enable the strategy in the same field will it count again all historical trades done in the previous day (stating the " Data Series " is Data -> Day to Load set i.e. at " 5 ") or the strategy, again enable, will restart from the following new trade that will come up ?

    Last, but not least, why if I decide to close NT and I can see that a strategy has in place an Open position, If I go to the specific tab Positions and then apply a right click on the horizontal line then click on " close position " it seems to me that the eventual profit / loss reached at that time is not calculated in the column " PnL " , while in the " live " If I decide to exit manually, this could happen, what reached could be added / subtracted to the total ... may be I am wrong in something, or I have a mismutch somewhere ....
    could you please give help on this ?

    Thanks in advance
    A.

    #2
    Hello Alinghy,

    Thank you for your inquiry.

    The Realized column in the Strategies tab does not take into account historical trades that were done by the strategy when re-enabling the strategy. Rather, it will only keep track of live trades done over the time the strategy is currently enabled. Once disabled and re-enabled again, the Realized column will reset back to 0.

    With "Immediately submit live working historical orders" selected in the "On starting a real-time strategy" section of the Options -> Strategies -> NinjaScript menu, when starting a NinjaScript strategy that relies on historical data for calculating its current position and orders states, it will immediately submit live any working orders that reflect the current strategy's overall order state. It is IMPORTANT to understand that the position of the strategy reported in the Strategies tab may not reflect the actual account-based position reported in the Accounts tab at the time the strategy is started. In this scenario, it is highly recommend that the account position be synced to the strategy position. More information about syncing account positions can be found here: http://ninjatrader.com/support/helpG..._positions.htm

    As strategies will evaluate over previous bars, conditions deemed true in real-time may not occur on historical bars, especially if you are not using a time-based bar and reload your historical data. So, historical executions may look different than when they occurred real-time during that same time period.

    You can view the discrepancies in this link from the NinjaTrader help guide: http://ninjatrader.com/support/helpG...ime_vs_bac.htm

    I am not exactly clear about your second question. When manually closing a position from the Positions tab, is thistrade not taken into account?

    When generating an Account Performance report in the Account Performance tab, does the PnL for the position not appear in the Trades tab once the position is closed?
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Hy ZacharyG,

      sorry if I answer only today to your kind indications: what I need to outline is the following ...

      If I have a strategy running an this Bot has already performed "realized" GrossProfit of +6030 usd and a GrossLoss of -3560 usd with a Total Net Profit of +2470 usd then the Bot is still running i.e. a reverse position and is running a "unrealized" profit of + 2150 why if I decide to close the position manually going to Control Center --> Position--> right click --> and then click on "Close Position" after that if I go on the chart then right click and do my choise "Strategy Performance" --> Real Time or Historical & Real Time in the windows that opens I dont find the +2150 usd calculated and added to the previous Total Net Profit amount of +2470 ??? It's ok for me that when I close manually the position already in place, automatically the strategy has stopped, but it is strange I dont find my profit / loss calculated .

      Could you please tell me your idea about what I am outlining ?

      Thanks so much in advance for the time you'll dedicate to answer my question

      Regards and best whishes
      A.

      I dont think I am wrong, could you explain it to me

      Comment


        #4
        Originally posted by Alinghy View Post
        If I have a strategy running an this Bot has already performed "realized" GrossProfit of +6030 usd and a GrossLoss of -3560 usd with a Total Net Profit of +2470 usd then the Bot is still running i.e. a reverse position and is running a "unrealized" profit of + 2150 why if I decide to close the position manually going to Control Center --> Position--> right click --> and then click on "Close Position" after that if I go on the chart then right click and do my choise "Strategy Performance" --> Real Time or Historical & Real Time in the windows that opens I dont find the +2150 usd calculated and added to the previous Total Net Profit amount of +2470 ??? It's ok for me that when I close manually the position already in place, automatically the strategy has stopped, but it is strange I dont find my profit / loss calculated .
        This would be shown in the Real-Time Performance. The Historical Performance is much like a backtest and shows performance based on historical bars - it is not a reflection of the actual trades made.

        If you manually close out your strategy positions go to the Account Performance tab to view the performance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by rocketman7, Today, 01:00 AM
        0 responses
        1 view
        0 likes
        Last Post rocketman7  
        Started by wzgy0920, 04-20-2024, 06:09 PM
        2 responses
        27 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, 02-22-2024, 01:11 AM
        5 responses
        32 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, 04-23-2024, 09:53 PM
        2 responses
        74 views
        0 likes
        Last Post wzgy0920  
        Started by Kensonprib, 04-28-2021, 10:11 AM
        5 responses
        193 views
        0 likes
        Last Post Hasadafa  
        Working...
        X