+ Reply to Thread
Results 1 to 12 of 12

How to screen out repeated buying/selling signals?

Hybrid View

  1. #1
    Registered User
    Join Date
    12-19-2018
    Location
    Hong Kong
    MS-Off Ver
    Excel 2016
    Posts
    74

    How to screen out repeated buying/selling signals?

    Very simple problem, but I simply can't figure out how.

    Say, A1=buy, A2=(space), A3=buy, A4=sell, A5=sell, A6=sell, A7=buy

    I want to screen out all the repeated signals, i.e., since I already bought upon A1, I would ignore A3. And sell on A4. After selling on A4, it'd have been sold, and A5/A6 and all subsequent selling signals will be ignored until a buying signal comes to tell me buy again.

    So, B1=buy, B2, B3=(space), B4=sell, B5, B6=(space), B7=buy

    What formula do I have to put on row B to achieve this result? This single thing would improve the efficiency of my excel technical analysis model a million times, since I now need to screen them out manually, on dozens of stocks, each consisting of dozens of technical models. A million thanks.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,426

    Re: How to screen out repeated buying/selling signals?

    Put this in B1:

    =A1

    and this in B2:

    =IF(OR(A2="",A2=LOOKUP("zzz",A$1:A1)),"",A2)

    Copy B2 down as far as you need to.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    12-19-2018
    Location
    Hong Kong
    MS-Off Ver
    Excel 2016
    Posts
    74

    Re: How to screen out repeated buying/selling signals?

    Thanks a lot Pete. Works like magic and that'd really help a lot. The magic power of the LOOKUP function is still beyond my comprehension at this point.
    What if the buying and selling signals are written in a language other than English? Like written in two single Chinese characters each representing “buy” and “sell” respectively. What should I put to replace the “zzz”? Thanks again.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,426

    Re: How to screen out repeated buying/selling signals?

    I don't know anything about Chinese characters, but the "zzz" in the English version is just a "large" text value, i.e. the last letter of the alphabet repeated three times. Perhaps you can apply this to the Chinese version.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    12-19-2018
    Location
    Hong Kong
    MS-Off Ver
    Excel 2016
    Posts
    74

    Re: How to screen out repeated buying/selling signals?

    Great help Pete! I found combining the two characters in place of "zzz" perfectly works for me. Simple solution, great results.

    Yet in practice now I have another problem. Those signals in row A are not actually plain words “buy”, “sell”, but are formula defining when they would display “buy” and when they would display “sell”. The LOOKUP formula we have works on plain words situation but not formula situations. What else should be put to make that work? It’s great to see the progress and thanks again!

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,426

    Re: How to screen out repeated buying/selling signals?

    It would help if you attached a sample Excel workbook.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post. Don't try to use the Paperclip icon (attachments button), as it doesn't work on this forum.

    Hope this helps.

    Pete

+ 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] Average stock price after buying and selling, only for specific ticker
    By kpronine in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-16-2022, 09:23 AM
  2. [SOLVED] How do I calculate the gains/loses made from buying and selling a stock?
    By radiotower in forum Excel General
    Replies: 8
    Last Post: 12-29-2016, 10:48 PM
  3. [SOLVED] If formula for buying and selling mark
    By erlindafb in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-29-2014, 05:59 AM
  4. Replies: 2
    Last Post: 04-13-2012, 08:22 AM
  5. Signals Change
    By sajeel in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 04-29-2009, 06:21 AM
  6. repeated screen "blinking" problem when running program - please help!
    By gunman in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-03-2005, 06:14 PM

Tags for this Thread

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