Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Last trasded strategy price

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

    Last trasded strategy price

    Is there some way to use last traded price- i.e. the last price that you traded upon as part of your strategy- part of your strategy?

    For example could you have a function built on bid last traded price-3 ticks?
    I know that you can use {average strategy price} but is there somewhere you can use the last price you traded on?

    Thanks

    #2
    Hello,


    I'm not sure what you want.

    You can use IOrder find out what your avg. fill price was and what your fill price was:


    You can use GetCurrentBid() and GetCurrentAsk():



    Note getting the bid and ask only works in real time, otherwise it returns the close value.
    DenNinjaTrader Customer Service

    Comment


      #3
      Ahh.. actually i would like to quote a price based off the last price that a strategy has executed.

      Can i call a function that tells me the last price that the strategy executed?
      The average function gives the average price for the strategy- what is the equivalent which is the last price the strategy traded on?

      Hope that is clearer?

      Thanks
      Alex

      Comment


        #4
        Hello,


        It depends on what you mean by executed:

        Execution usually means when an order is filled. In this case use the IOrder stuff I posted.

        If you mean the last price the strategy recieved as an incoming tick or new bar, these are bid and ask. In the strategy analyzer however you have access to the Open, High, Low, and Close of the bar.
        DenNinjaTrader Customer Service

        Comment


          #5
          Ben,

          Thanks.. i think i get it.. if i call the IOrder function with the AvgFillPrice that should give me the average fill of the last order.

          what if I want to use the last fill -which would be be the last trade executed as part of an order?

          Comment


            #6
            Hello,

            Then you would assign that IOrder fill price to a variable and then use that variable in your strategy.
            DenNinjaTrader Customer Service

            Comment


              #7
              Thanks Ben... i guess the question I am asking is how do you get that particular order ID? Is there a function call of {get last executed trade price}?

              Thanks again

              Comment


                #8
                You need to just use IOrders. Then you reference the IOrder object for the information you want.
                Josh P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Stanfillirenfro, Today, 07:23 AM
                9 responses
                23 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by George21, Today, 10:07 AM
                0 responses
                5 views
                0 likes
                Last Post George21  
                Started by DayTradingDEMON, Today, 09:28 AM
                2 responses
                16 views
                0 likes
                Last Post DayTradingDEMON  
                Started by navyguy06, Today, 09:28 AM
                1 response
                6 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Started by cmtjoancolmenero, Yesterday, 03:58 PM
                8 responses
                32 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Working...
                X