Strategy · Pine Script v6 · Own pane

Thermometer Strategy

by AlanGuo

A strategy that reads an external oscillator, called the thermometer, through a source input and trades a chosen signal symbol, SPX by default, according to high and low temperature thresholds of 75 and 25.

View on GitHub

Repaints

GitHub stars1on the repository
Pine versionv6current
Lines of code158
Settings21inputs
LicenceNone stated
Last update7 months ago31 Mar 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

Buy and sell modes include buying high and selling low, or buying low with different exits such as a stop, a break lower or a moving average. A short average or fixed gap reduces noise, and an optional take-profit level is available. It recalculates on every tick and has no stop loss in some modes.

Details

Published by

AlanGuo on GitHub

Type

Strategy, Pine Script v6

Draws

Separate pane below the chart

Category

Oscillators & momentum, Mean reversion

Markets

Indices

Timeframes

H4 and above

Risk Notes

  • Signals can change on the live bar or after it closes (repainting)
  • The strategy enters trades without a stop loss

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
超卖int30overSoldValue
超买int70overBoughtValue
ADX Thresholdint25adxThreshold
Datetimetimestamp('1 Feb 2018 00:00 +0800')start_date
Datetimetimestamp('31 Dec 2099 00:00 +0800')end_date
信号标的symbolSPXsignalSymbol
开启回测booltruebacktest
温度计高温int75high_temp
温度计低温int25low_temp
买卖方式string高买低卖bs_method
防摩擦方式string短均线temp_gap_method
温度计防摩擦(固定)int1temp_gap
Show all 21 settings
SettingTypeDefaultVariable
温度计防摩擦(均线周期)int3temp_gap_ma_length
温度计止盈boolfalsetemp_take_profit
温度计止盈int60take_profit_temp
均线int60ma_length
均线类型stringSMAma_option
价格不高于均线(%)float5.0price_diff_pct
余额复利booltruecompound
固定数量float1.0quantity
二二温度计sourceclosefinalScore
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

This strategy combines Larry Williams' Vix Fix synthetic volatility indicator with Bollinger Bands. It calculates standard and inverted Williams Vix Fix metrics, displaying them as histogram columns with standard deviation bands in a separate pane. Long entrie

Strategy v4 Volatility & bandsOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Williams Vix Fix Strategy [Alorse]

2xTP, SL to Entry

by hasnocool
106 stars

This strategy executes mean-reversion trades based on Bollinger Bands and the Stochastic Oscillator. Long orders trigger when price dips below the lower band alongside a bullish Stochastic crossover, with an optional oversold threshold. Short orders execute on

Strategy v5 Mean reversionOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of 2xTP, SL to Entry

Greeffer BB Strategy

by SammyEnigma
18 stars

This strategy fades Bollinger Band extremes using the close. It enters short when price crosses above the upper band and the 14-period RSI is above 70, and enters long when price crosses below the lower band and RSI is below 30. It closes half of an open short

Strategy v4 Volatility & bandsOscillators & momentum
Updated 6 years ago · None stated GitHub repository of Greeffer BB Strategy

This strategy calculates the WaveTrend oscillator alongside Stochastic RSI to identify reversal setups at overbought and oversold extremes. It enters long positions when the WaveTrend oscillator crosses upward below configured oversold levels, and enters short

Strategy v6 Oscillators & momentumMean reversion Repaints
Updated 2 days ago · MIT GitHub repository of WaveTrend v4 [WavesUnchained] Strategy

Williams %R Reversal - Eterna MCP

by EternaHybridExchange
9 stars

This strategy tracks the Williams %R oscillator to trade mean-reversion bounces from overbought and oversold extremes. It opens long or short positions when a reversal signal occurs alongside confirming price direction, while generating JSON-formatted alert pa

Strategy v5 Oscillators & momentumMean reversion
Updated 7 months ago · MIT GitHub repository of Williams %R Reversal - Eterna MCP

More strategys

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers