• Visão global
  • Comentários
  • Discussão
  • O que há de novo

TSO Thermostat Strategy MT4

TSO Thermostat Strategy is an indicator that can adapt to the current market conditions by switching from a trend-following mode to a short-term swing mode, thus providing the best possible entry/exit signals in any situation. It is based on the Thermostat Trading Strategy as presented in the book Building Winning Trading Systems with TradeStationby G. Pruitt and J. R. Hill.

 

Strategy

The Thermostat Strategy uses different entry and exit conditions based on the current situation of the market - trending or swinging. The Choppy Market Index (CMI) is used to detect the current market mode. A CMI of less than 20 indicates a swinging market, whereas a value of 20 and above indicates a trending market.

CMI is not fully drawn on he graph. The two lines of the Bollinger Bands have been colour-coded to show whether the price is below (white) or above (purple) the CMI threshold level.


Swing Mode (white BB)

  • A simple visual pattern is used to determine periods where the market has a bullish or bearish bias. The market is expected to behave in a bearish manner if the close price of the last candle is greater than the average of the previous candle's high low and close (also known as key of the day) and vice versa.
  • Entry conditions for a bullish market:
    • Enter long at whichever is higher:
      • the open price of current candle + 50% of the ten-period average true range, or
      • the 3-period moving average of the low prices.
    • Enter short at whichever is lower:
      • the open price of current candle 75% of the ten-period average true range, or
      • the 3-period moving average of the high prices.
  • Entry conditions for a bearish market:
    • Enter long at whichever is higher:
      • the open price of current candle 75% of the ten-period average true range, or
      • the 3-period moving average of the low prices.
    • Enter short at whichever is lower:
      • the open price of current candle + 50% of the ten-period average true range, or
      • the 3-period moving average of the high prices.
  • Exit conditions:
    • A signal for entry in the opposite direction in swing mode.
    • Take Profit and Stop Loss are placed at ± 3 * (10-period Average True Range)

Trend Mode (purple BB)

  • Entry conditions: When a candle closes above or below the Bollinger Bands, then a buy or sell position is opened respectively. (break-out)
  • Exit conditions:
    • A signal for entry in the opposite direction in swing mode.
    • Only Stop Loss is placed at the moving average of the Bollinger Bands. If a different MA is used, the stop loss will be placed at the opposite BB should that be closer to the entry price.

Inputs

  • Maximum Drawn Bars - the number of bars the indicator will be drawn on.  Reducing this lets the indicator load faster.
  • Bollinger Bands Settings
    • Period - the period of the Bollinger Bands.
    • Deviation - the number of standard deviations between the bands and the moving average.
    • Applied to - the candle price on which the Bollinger Band calculations will be based.
  • ATR Settings
    • Period - The period of the ATR used in swing mode.
  • MA Buy Settings - The settings for the Moving Average that is used as entry price for long positions in swing mode.
  • MA Sell Settings - The settings for the Moving Average that is used as entry price for short positions in swing mode.
  • MA Trend Stop Settings - The period of the Moving Average used as stop loss in trend mode.
  • Choppy Settings 
    • Period - The period of the Choppy Market Index
    • Level - The threshold level to determine the market mode.
    • MA Period - A moving average can be used to smooth the CMI in order to avoid repeated changes of the market mode detected within few periods. This MA can be cancelled by setting the value to 1.
  • Alert Settings
    • ENABLE Metatrader Alerts - set to "true" to receive an alert on the Metatrader platform when an entry signal appears.
    • ENABLE Email Alerts - set to "true" to receive an email alert when an entry signal appears.
    • ENABLE Push Notifications - set to "true" to receive a push notification on your mobile phone when an entry signal appears.


For EA Developers

  1. Price of buy entry: Buffer = 0
  2. Price of sell entry: Buffer = 1
  3. Stop Loss: Buffer = 2
  4. Take Profit: Buffer = 3
  5. Upper Bollinger Band in trend mode: Buffer = 4
  6. Lower Bollinger Band in trend mode: Buffer = 5
  7. Upper Bollinger Band in swing mode: Buffer = 6
  8. Lower Bollinger Band in trend mode: Buffer = 7


Sem comentários
Versão 1.5 2018.11.26
- minor bug fixes and improvements