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 AaronKoRn, Today, 09:49 PM
        0 responses
        7 views
        0 likes
        Last Post AaronKoRn  
        Started by carnitron, Today, 08:42 PM
        0 responses
        9 views
        0 likes
        Last Post carnitron  
        Started by strategist007, Today, 07:51 PM
        0 responses
        10 views
        0 likes
        Last Post strategist007  
        Started by StockTrader88, 03-06-2021, 08:58 AM
        44 responses
        3,980 views
        3 likes
        Last Post jhudas88  
        Started by rbeckmann05, Today, 06:48 PM
        0 responses
        9 views
        0 likes
        Last Post rbeckmann05  
        Working...
        X