• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Last Trade Data

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

    Last Trade Data

    Hi,

    I'm a bit new at NinjaScript so please forgive if this is a stupid question. (i do have some .NET programming experience)

    Is there any class/object providing info (entry price, exit price, profit/loss, time. etc. etc.) about specific trades?

    For example, unsing NinjaScripthow would I determine if the previous trade of the day was a winner or loser?

    I came across this requirement while trying to convert some of my EasyLanguage code to NinjaScript.

    Any response much appreciated.

    Regards,



    Jerry



    #2
    imported post

    >> Is there any class/object providing info (entry price, exit price, profit/loss, time. etc. etc.) about specific trades?

    You could try playing with a 1 tick series which holds all trades of the complete lookback period

    >> For example, unsing NinjaScripthow would I determine if the previous trade of the day was a winner or loser?

    StrategyBase.Performance.AllTrades is a collection of all trades of the strategy (pls serach docs for AllTrades).


    DierkNinjaTrader Customer Service

    Comment


      #3
      imported post

      Thanks for the response.

      >>StrategyBase.Performance.AllTrades is a collection of all trades of the strategy (pls serach docs for AllTrades).


      Yes, but how does one reference individual trades in the collection and expose its properties?

      Comment


        #4
        imported post

        Sorry, indexed access it not supported at this time. This is "only" an enumerator.
        DierkNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Teebone21, Today, 10:38 AM
        0 responses
        6 views
        0 likes
        Last Post Teebone21  
        Started by J_o_s, 03-30-2020, 12:29 AM
        2 responses
        15 views
        0 likes
        Last Post J_o_s
        by J_o_s
         
        Started by ptpatrader, Today, 10:27 AM
        0 responses
        4 views
        0 likes
        Last Post ptpatrader  
        Started by albertokeira, Today, 09:30 AM
        0 responses
        8 views
        0 likes
        Last Post albertokeira  
        Started by U0000999, Today, 05:44 AM
        0 responses
        10 views
        0 likes
        Last Post U0000999  
        Working...
        X