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

Unable to call ATM from within a strategy.

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

    #16
    Paul, can you please tell me is it normal that market replay under the strategies tab will not record P&L and performance "real time" of a strategy using ATM? I now have the script working as should but, I can see the trades opening, the trail and profit but it does not register in the control center strategies tab nor in strategy performance.

    Comment


      #17
      for example here is the output

      The entry order average fill price is: 2963
      The entry order filled amount is: 1
      The entry order order state is: Filled
      The current ATM Strategy market position is: Flat
      The current ATM Strategy position quantity is: 0
      The current ATM Strategy average price is: 0
      The current ATM Strategy Unrealized PnL is: 0

      Comment


        #18
        Hello Gille1983,

        Thanks for your replies.

        Correct, it is expected that any strategy that uses ATM methods will not report PNL in the strategies tab. You can verify this by running the SampleATMstrategy as is.

        The SampleATMstrategy will output its values, here is an example;

        Enabling NinjaScript strategy 'Sample ATM strategy/198933936' : On starting a real-time strategy - StartBehavior=WaitUntilFlat EntryHandling=All entries EntriesPerDirection=1 StopTargetHandling=By strategy position ErrorHandling=Stop strategy, cancel orders, close positions ExitOnSessionClose=True / triggering 30 seconds before close SetOrderQuantityBy=Strategy ConnectionLossHandling=Keep running DisconnectDelaySeconds=10 CancelEntriesOnStrategyDisable=False CancelExitsOnStrategyDisable=True Calculate=On bar close IsUnmanaged=False MaxRestarts=4 in 5 minutes
        The entry order average fill price is: 8916.5
        The entry order filled amount is: 1
        The entry order order state is: Filled
        The current ATM Strategy market position is: Long
        The current ATM Strategy position quantity is: 1
        The current ATM Strategy average price is: 8916.5
        The current ATM Strategy Unrealized PnL is: -15
        The current ATM Strategy market position is: Long
        The current ATM Strategy position quantity is: 1
        The current ATM Strategy average price is: 8916.5
        The current ATM Strategy Unrealized PnL is: -25
        The current ATM Strategy market position is: Long
        The current ATM Strategy position quantity is: 1
        The current ATM Strategy average price is: 8916.5
        The current ATM Strategy Unrealized PnL is: 0
        The current ATM Strategy market position is: Long
        The current ATM Strategy position quantity is: 1
        The current ATM Strategy average price is: 8916.5
        The current ATM Strategy Unrealized PnL is: -15


        If your strategy is not working as expected then you would need to debug to find out why. For clarification we do not provide debugging services.

        Here is a link to our debugging tips: https://ninjatrader.com/support/help...script_cod.htm

        If you would like your strategy created for you, we can provide a link to 3rd party programmers available through the NinjaTrader Ecosystem.
        Last edited by NinjaTrader_PaulH; 05-05-2020, 06:58 AM. Reason: Changed the link to NT7 help guide (was NT8)
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cre8able, Today, 01:16 PM
        2 responses
        9 views
        0 likes
        Last Post cre8able  
        Started by chbruno, 04-24-2024, 04:10 PM
        3 responses
        48 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by samish18, Today, 01:01 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by WHICKED, Today, 12:56 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by WHICKED, Today, 12:45 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X