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

Lifo/fifo

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

    Lifo/fifo

    UPDATE: It does not work in live-mode. Orders are executed as FIFO, regardless of the unique ID's I give them. Bummer!

    ------------------------

    I have a question regarding LIFO/FIFO.

    So I'm running an FX automated strategy with FXCM. I enter multiple positions from the same side (long). Each order is assigned a unique ID (Long0, Long1, Long2 etc). I have a specific profit target for each order.

    Situation:

    I have EURUSD Long0 open at 1.1050 with a proft target of 1.1075. I also have Long1 open at 1.0990 with a profit target of 1.1015. Now Long1 hits profit target of 1.1015.

    Question:
    Does Long1 in fact get closed and Long0 still be open? (LIFO). Or does in fact Long0 be closed for a loss and Long1 still be open (FIFO).

    I ran it through the backtest and then it seems it runs LIFO, so it respects each individual profit target and closed accordingly. But I wonder how it goes in reality.

    Thanks!
    Last edited by siroki; 07-16-2015, 04:51 AM.

    #2
    Hello,

    Thanks for your reply.

    That is correct. FIFO will always be the case although your stops/targets will work as programmed. This is to ensure you get the best fills possible.
    BrandonNinjaTrader Customer Service

    Comment


      #3
      What do you mean by stops/targets will work as programmed? When Long1 is running into a loss and Long2 is almost hitting target of +10 pips, I see that Long1 is closed in stead of Long2. So the FIFO works, but the targets (which are set by uniqueID) as not really working as programmed. At least not for the intended position

      Comment


        #4
        Hello siroki,

        Thanks for your reply.

        Your orders will fill based on market conditions at their placed values. The position they exit will always be FIFO.
        BrandonNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by kaywai, Today, 06:26 AM
        1 response
        6 views
        0 likes
        Last Post kaywai
        by kaywai
         
        Started by ct, 05-07-2023, 12:31 PM
        6 responses
        203 views
        0 likes
        Last Post wisconsinpat  
        Started by kevinenergy, 02-17-2023, 12:42 PM
        118 responses
        2,780 views
        1 like
        Last Post kevinenergy  
        Started by briansaul, Today, 05:31 AM
        0 responses
        10 views
        0 likes
        Last Post briansaul  
        Started by traderqz, Yesterday, 12:06 AM
        11 responses
        28 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X