Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Print Last trade problem

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

    Print Last trade problem


    Hello, I would like to obtain the profit or the stop in currency of the last trade, but I think that my input method does not allow the usual method to be used (systemperformance, alltrades.count always gives 0, does not add trades)


    my input method is as follows

    entryOrderShort = account.CreateOrder(Cbi.Instrument.GetInstrument(i nstrumentCC), OrderAction.Sell, OrderType.Market, TimeInForce.Day, Contracts, 0, 0, string.Empty, "Entry", null);
    NinjaTrader.NinjaScript.AtmStrategy.StartAtmStrate gy(ATMTemplate, entryOrderShort);


    I think that obtaining the ATMstrategyID could obtain that information, but since it is not invoked in a common way, I do not know how to obtain that ID


    I hope you can help me find a way to print the information of the last trade once it has been closed

    #2
    Hello RubenCazorla,

    You are using the Addon framework ATM submission so there would be no performance information tied to that. You would need to use the regular tools in the platform to view performance, that is submitting the order similar to a manual tool like the chart trader. For a script to see trade performance you would need to be using a Strategy and use the Managed or Unmanaged framework.



    There is also a strategy based ATM framework however the items like system performance do not work with that, you would need to use the strategy specific methods to query the ATM.


    You can see the sample strategy SampleATMStrategy that comes with the platform for an example of how to use ATM's in a strategy.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    58 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    133 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
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X