+ Reply to Thread
Results 1 to 3 of 3

Determining where a trailing stop gets triggered

  1. #1
    Registered User
    Join Date
    06-23-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    2

    Determining where a trailing stop gets triggered

    Hello everybody,
    I have a spreadsheet in the following form (please let me know if the image didn't upload properly):
    Excel(Trailing).png
    The actual spreadsheet is more complicated with a lot of columns but this gives the main information that I get out of it.

    The first column has the closing prices of every 1HR bar.
    The second column will have a value only if a trade has been entered (+ve if it is a buy, -ve if it is a sell).
    The third column has the initial stop-loss simply calculated as the entry level +or- 1pt.
    The fourth column has the take-profit value simply calculated as the entry level +or- 2pts.
    As you can see a lot of trades in either direction can currently be opened at any one time.

    I am trying to incorporate a trailing loss system whereby the stop is moved so that it is always at max 1pt worse than the current closing price.
    So in the first example, where we bought at 81.981 with initial stop of 80.981. If the close in a few bars rises to 82.45 then I want to move the stop to 81.45.
    Eventually we get to a point where the trailing stop would stop updating because of 1 of 2 things occurring.
    1) the take profit level gets hit. So in the above example the take profit was at 83.981. The last trailing stop would be around 1pt away from here then (depending on where the close was).
    2) the price moves against and the trailing stop gets triggered.

    I currently know how to calculate the number of rows away that the take-profit gets triggered since it is a static number I am searching for.
    However I am having difficulty doing the same for the trailing stop since this number is supposed to be updated with the new closing prices (depending on if it is moving in our favor).
    In the final column where I left "?" I am trying to determine where the trailing stop will end up getting triggered. Ideally, trying to figure out how many rows away from the trade entry it is.
    Is there a way to use excel formulas in the cell to try and achieve this (by index() or match() or something like that) or will a macro have to be created for this purpose?

    Thank you for your help.

  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Determining where a trailing stop gets triggered

    Moderator's Note:


    Welcome to the forum since your new to the forum may i suggest you to attach a real workbook. Typing data from a picture or paste text from your post into a spreadsheet as a hindrance to helping. To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.

    Nice to have you with us.
    regards,
    Vladimir
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  3. #3
    Registered User
    Join Date
    06-23-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Determining where a trailing stop gets triggered

    Thank you for the advice Vladimir. I have attached a workbook as well.
    Attached Files Attached Files

+ 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