+ Reply to Thread
Results 1 to 3 of 3

Keeping Track Of A Trading System

  1. #1
    Registered User
    Join Date
    09-29-2005
    Posts
    6

    Keeping Track Of A Trading System

    Hello,

    I have been wrestling with a 'challenge' for a few days and would appreciate a second, or third, pair of eyes.

    The attached sheet is an extract, which just contains sample trades, from a much larger dataset of stock prices. There is a count of trades, a flag indicating a trade open or a trade close and a running total of positions, i.e. how many trades are currently open. A lot of the trades are closed by the subsequent trade but other trades can remain open for a longer period. There is no limit the number of concurrent open trades (although, in reality, it would be <12).

    The objective is to track the opening and closing price of each trade. By the way, these are hedging trades so they might appear to be losing money, because the closing price is invariably lower than the opening price, but that is by design.

    The complication is that the most recent open trade must be closed first, the previous open trade closed next, etc. Trade #1 is closed by trade #2. #15 is closed by #18. #21 is closed by #24. The challenge is how to close #10 with #25, #7 with #26, etc.

    Absolute row references can't be used because there are many other rows of price data between each trade.

    Any suggestions greatly appreciated.

    Thanks,
    Kevin
    Attached Files Attached Files
    Last edited by kevtherev; 02-02-2021 at 07:51 AM.

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Keeping Track Of A Trading System

    Please try at G2

    =IF(C2="O",INDEX(A3:A27,MATCH(D2-1,D3:D27,)),A2)
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    09-29-2005
    Posts
    6

    Re: Keeping Track Of A Trading System

    Thank you, Bo_Ry. That's an elegant solution.

    Best Regards,
    Kevin

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Keeping Track of VBA
    By Jim Clayton in forum Excel General
    Replies: 5
    Last Post: 07-19-2018, 09:30 PM
  2. Keeping track of attendance point system
    By okracerx in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-30-2013, 11:08 PM
  3. [SOLVED] keeping track of payments
    By puzzledpete in forum Excel General
    Replies: 11
    Last Post: 10-09-2013, 09:57 AM
  4. Excel sheet for trading system
    By smarttj1027 in forum Excel General
    Replies: 0
    Last Post: 06-02-2010, 05:39 AM
  5. Replies: 6
    Last Post: 05-21-2010, 11:14 AM
  6. Keeping track
    By JamesT1 in forum Excel General
    Replies: 2
    Last Post: 08-23-2008, 08:03 AM
  7. [SOLVED] Keeping track of useful macros
    By malvis in forum Excel General
    Replies: 1
    Last Post: 08-02-2005, 07:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1