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

spread thoretical entry / execution price

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

    spread thoretical entry / execution price

    Hello,
    what is the best/fast way to calculate the difference between theoretical entry and execution price? for example, I would entry long at x price but the trade entry at Y price( 2 ticks over x). how can i caclulate the delta y-x?
    Thank you!

    #2
    Hello zteck,

    Are you looking for the historical difference or an implied future value? For example are you looking for historical slippage values?

    If you could please provide more detail that would be helpful.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Hello Alan_p and thank you for your reply.
      I'm looking for slippage value after the entry. For example, if my target is z ticks from theoretical entry X but my trade started at Y price, I would to set my target z-( y-x) from y. if i know the slippage I'll calculate
      the y-x delta.

      Comment


        #4
        Hello zteck,

        What you could do is when the entry order is submitted, save the bid/ask or last price to a variable. Then within OnExecutionUpdate you could check the fill price against the bid/ask/last value you saved to a variable when the order was submitted.

        Please see OnExecutionUpdate section of our helpguide,


        Please let us know if you need further assistance.
        Alan P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by arvidvanstaey, Today, 02:19 PM
        4 responses
        11 views
        0 likes
        Last Post arvidvanstaey  
        Started by samish18, 04-17-2024, 08:57 AM
        16 responses
        61 views
        0 likes
        Last Post samish18  
        Started by jordanq2, Today, 03:10 PM
        2 responses
        9 views
        0 likes
        Last Post jordanq2  
        Started by traderqz, Today, 12:06 AM
        10 responses
        18 views
        0 likes
        Last Post traderqz  
        Started by algospoke, 04-17-2024, 06:40 PM
        5 responses
        48 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X