/*********************************************************************************************** Title: AutoStop Indicator for eSignal By: Divergence Software, Inc. Web: http://www.sr-analyst.com ================================================================================================ Project Description: This indicator is similar in operation to the well-known SuperTrend indicator, but has several enhancements. The AutoStop indicator has two modes of operation: Continuous - Stop begins calculating as of the first bar of data in your chart and reverses whenever the stop is hit. This is the default mode of operation and, in this mode, it can be used as a trading system. Manual - User clicks on the Long or Short button at the bottom-left of the chart and then clicks on the bar where the stop should begin calculating. The stop will update on each new bar and continue plotting until such time as the stop is hit. In this mode, the AutoStop indicator can be used in conjunction with a separate trading system or methodology. Note that the Long/Short buttons will only appear on the chart if Manual Mode has been selected. While the AutoStop indicator can be configured to require a price bar to close through the stop, the default mode of operation will consider the stop hit when touched by either a bar high or low. In addition, you can configure the stop to "snap-to-tick" so that the stop value will always be a valid trading price increment. The AutoStop indicator also has a profit protect feature that can be activated via the menu. When activated, the profit protect logic will ratchet the stop closer to price by a user-defined increment whenever a bar advances in the direction of the trade. The default PP Ratchet value is 0.005% (1/2 of 1 percent) but can be adjusted as needed. Lastly, all cosmetics can be adjusted via the menu and alerts will be generated whenever the stop is hit (in manual mode) or reverses (in continuous mode). Note: When in Manual Mode you must be holding down the SHIFT key on your keyboard when clicking on one of the buttons OR when clicking to set the first bar of the trade. Script Parameters: Tick Size: Here you can specify the tick size of the instrument you are trading. The default value is 0 which means that the indicator will auto-detect the correct tick size. Manual Mode?: Check the box to activate Manual Mode. By default the box is unchecked. Period: Specify the calculation period for the stop logic. The default is 10. The valid range is from 1 to 125. Multiplier: Specify the multiplier to use for the stop logic. The default is 5.0. The valid range is from 0.001 to 20. Stop Source: Specify the price source to use for the stop logic. The default is hl2. Require Close Through Stop?: Check this box if you require a price bar to close through the stop. By default the box is unchecked. Snap to Nearest Tick?: Check this box if you require that the stop price always represents a tradeable price based on the tick size of the instrument. By default the box is unchecked. Use Profit Protect?: Check this box to activate the Profit Protect feature. By default this box is checked. PP Ratchet %: Specify the Profit Protect Ratchet percentage. The default value is 0.005. Long Stop Color: Specify the color used to plot a long stop. The default is green. Short Stop Color: Specify the color used to plot a short stop. The default is red. Thickness: Specify the line thickness to use when plotting the stop. The default is 2. Line Type: Specify the line type to use when plotting the stop. The default is Dot. Use Flat Lines?: Check this box if you want the stop displayed as flat lines (i.e., line segments do not connect). By default this box is unchecked. Button FG Color: Specify the foreground color to use for the buttons. The default is white. Note that the buttons will only be displayed if Manual Mode is selected. Long BG Color: Specify the background color to use for the "Long" button. The default is green. Short BG Color: Specify the background color to use for the "Short" button. The default is red. Clear BG Color: Specify the background color to use for the "Clear" button. The default is blue. Font Size: Specify the font size to use for the buttons. The default is 8 and the range is from 4 to 55. Use Sound Alerts? Check this box if you want audible alerts generated whenever a stop is hit. By default this box is unchecked. Use Popup Alerts? Check this box if you want pop-up alerts generated whenever a stop is hit. By default this box is unchecked. Use Email Alerts? Check this box if you want email alerts generated whenever a stop is hit. By default this box is unchecked. Bullish Alert WAV File: Use this option to set the WAV file that will play when a Sound Alert is triggered for a Long Stop. Default WAV file is DING.WAV. Bearish Alert WAV File: Use this option to set the WAV file that will play when a Sound Alert is triggered for a Short Stop. Default WAV file is BOING.WAV. Disclaimer: For educational purposes only! Obviously, no guarantees whatsoever and use at your own risk. *******************************************************************************************************/