FIFO Multiple entries, same pair, same side

Discussion in 'Forex' started by FutureScalper, Dec 17, 2010.

  1. Currently I have a strategy of scaling which I believe may be disrupted by the FIFO ruling. Consider the following trades in a fictional market, using the MetaTrader 4 "ticket" concept for each "trade".

    There is no "Hedging" involved, as we are working one side of the market only (long only, or short only), and using one currency pair only, Buy and Sell quantities are always equal for simplicity.

    Here is an example of a Long sequence as market initially drops:

    Ticket 1: Buy @100
    Ticket 2: Buy @90
    Ticket 3: Buy @80

    Now, market rises to 85. I want to close Ticket 3 by Sell @85.
    (My understanding of FIFO is that I CANNOT do this. Ticket 1 would need to be closed first.)

    The way I would wish to continue is:
    Assume market drops again to 80.

    Ticket 4: Buy @80
    Market rises to 90. Sell @90, closing Ticket 4
    Market continues to rise, so Sell @95 (closing Ticket 2)
    Market continue to rise, so Sell @105 (finally closing Ticket 1)

    I'd like to understand whether this will be disrupted by recent regulatory changes in the U.S.
  2. rosy2


    whats the FIFO ruling?
    what does it matter which order gets closed first; that's just accounting stuff
  3. fifo= first-in, first-out.

    In the US the regulations enforce that.

    Perhaps this type of rule aligns itself with acceptable accounting rules for tax purposes in this industry. This bookkeeping practice allows for length of trade issues stretching across tax years and a benchmark for ALL United States dealers to follow for reporting purposes...both to the Trader and the IRS.

    In the case of an audit...without standardized regulations...well you can understand it would be impossible to hold a dealer to the fire...He could literally pick and choose what positions are open and what positions are closed regardless of what he told you....Timestamps would be meaningless..

    Now if we could get a standardized quote feed....that would be awesome for the cash and globally...but don't hold your breath as Forex is Global and we are not a one-world economy (yet).

    And with the dollar losing its position as the worlds reserve currency...well we will fragment even more so...Good luck traders...

  4. Well it certainly disrupts the appearance of a smooth closed account balance, and may require modifications in my controlling EA's as to which to close first but...

    The end result from flat to flat will be the same, that much I understand, but the closed trade accounting would be extremely jagged under this restriction.

    A cosmetic issue only? :) Well, sometimes cosmetics reveals something deeper? Only joking... ;-)

    So, let me go on record as understanding that the end result will be the same in my scenario, but the first approach shows a much smoother account growth in the closed account history. I would rather that my "take profit" transactions be positive in most cases, rather than initially showing closed losses as the FIFO rule may require.
  5. Money managment calculations are affected...but it seems that you are a coder and are well aware of that..

    also swap costs could be affected if the trades are different sizes...(this is also another valid reason for FIFO regulations) A larger trade held longer verses a smaller trade exited may or may not have timing on its an offshore or "outside the US" dealer may yield different results on your system..

    Many times a smooth upward equity curve is desirable...but it has been my experience that the better systems are the jagged ones...they seem to be able to be mirrored more accuratly by the client.. I speak only from experience and I do not expect others to agree with me and I really do not care if they do or don't. You can see these smooth upward equity curves without cliffs in martingale systems many times...(until the big cliff arrives :D ☺)


  6. I assume you're talking about the new regs that go into effect next year. My understanding is that FIFO is the default method but you can also use LIFO, specific identification, etc. Whatever your broker is capable of handling.
  7. Just started with an Alpari US account.

    They enforce FIFO. Didn't think I'd have to confront it so early on...

    Already modified my EA's to close "FIFO style" earliest order first.

    Thanks to all, what a coincidence I ran into it just after posting about it !!!!
  8. FutureScalper,

    We have an EA section now in EliteTrader and you are most welcome to post your EA...if it is not a commercial EA and if you are not a Vendor or selling it...etc....

    Hey..I gotta ask ok? We really would like the participation of more coders in the new Forum...

    Naturally you can post your stuff in the classifieds here also...


  9. I am a vendor, but not trying to sell anything though. Anyway, the EA collection is not self-contained. It implements bi-directional socket comms with the Analysis and Trading engine, and accepts trading commands... So MetaTrader is a Slave execution engine...

    Not a "traditional" EA at all...
  10. So you use the DLL files and you can code in "C"! anyways...I have respect for that and if you ever want to share some EA's....I invite you and shake your hand with both of mine...


    #10     Dec 17, 2010