+ Reply to Thread
Results 1 to 3 of 3

Logic Problem

  1. #1
    Registered User
    Join Date
    06-18-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    1

    Logic Problem

    Ok this is a bit difficult to explain so please forgive the long-winded explanation…

    I am constructing a spreadsheet that gives buy and sell signals for stock exchange data, depending on the way a stock price is trending. Each row in the sheet represents the data for a given date, in chronological order; the row for each date contains price data and other calculations.

    I have used logic functions to generate “buy” and “sell” signal – there is a column for “buy” and a column for “sell”, and the excel function gives a TRUE or FALSE output in these cells based on the trends. TRUE in the “buy” column for a given date means buy the stock, TRUE in the “sell” column means sell the stock, and FALSE on both columns means do neither. Typically, a “buy” signal will be followed by several days in which nothing happens – these are “in” days, where a stock is held, and then a “sell” signal will be generated, which will be followed by several “out” days, where no stock is held.

    What I now want to do is to have columns for “in” and “out”, and to use some kind of logic function to generate these. So when a “buy” signal is generated, the “in” column returns a TRUE, and subsequent days also return TRUE until a “sell” signal is generated, at which time the “out” column will become TRUE and the “in” becomes FALSE.

    Not really sure if this makes sense to anyone – does anyone have any ideas how to do this?

  2. #2
    Valued Forum Contributor
    Join Date
    11-20-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    597

    Re: Logic Problem

    upload a copy of the workbook otherwise it is next to impossible to comprehend

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Logic Problem

    Hi and welcome to the forum

    We would love to help you with your question, but 1st, in accordance with forum rules, please rename your thread to something more meaningful, that actually describes your problem.

    Because thread titles are used in searching the forum it is vital they be written to accurately describe your thread content or overall objective using ONLY search friendly key words. That is, your title used as search terms would return relevant results.

    Many members will look at a thread title, and if it is of interest to them, or it falls within their area of expertise, they might only open those threads.

    Look at it this way...if you typed that title into google, what would you expect to get back?
    To change a Title on your post, click EDIT on you're 1st post, then Go Advanced and change your title
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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