Horizon Trading
  • Welcome to Horizon AI
  • After Sign Up
    • Connecting your Discord
    • Download the Chrome Extension
  • HorizonAI Chat
    • Introduction
    • Horizon Chat Best Practices
    • Features
      • Connecting to the Pine Editor
      • Chat Commands
      • Quick add Scripts
      • Starting a New Project
    • Examples
      • Advanced Order Blocks w/ Volume
  • Script Builder
    • What is the Script Builder
    • Blocks
      • Indicators
      • Day and Time
      • Candle Patterns
      • Conditions
      • Open/Closing a Trade
    • Building your first script
    • Script Templates
      • Making an EMA Crossover
      • Higher TimeFrame Supertrend
      • Order Block Retest w/ Market Structure
      • Trend Line Breakout in a Trending Market
      • Break of Structure during London Open
Powered by GitBook
On this page
  1. Script Builder
  2. Script Templates

Higher TimeFrame Supertrend

Creating a Supertrend indicator that uses Higher Timeframe Data

PreviousMaking an EMA CrossoverNextOrder Block Retest w/ Market Structure

Last updated 7 months ago

This guide will walk you through creating a Supertrend indicator that uses Higher Timeframe Data

Steps:

Drag an Indicator Block onto the canvas

  1. Select SuperTrend as your Indicator

  2. Set the Indicator settings for the SuperTrend

  3. Set the "TimeFrame" to "240" for a 4 Hour Supertrend

  4. Save the Indicator

Add a Condition Block

  1. Drag a Condition Block onto the canvas.

  2. Connect the Supertrend Indicator Block to this Condition Block.

  3. For "Line 1", select "Direction".

  4. For "Condition", choose "Is".

  5. For "Line 2", select "Bullish".

  6. Save the settings.

Drag a Second Indicator Block onto the canvas

  1. Select RSI as your Indicator

  2. Set the Indicator settings for the RSI

  3. Save the Indicator

Add a Second Condition Block

  1. Drag a Second Condition Block onto the canvas.

  2. Connect both the RSI Indicator Block and the First Condition Block to this Condition Block

  3. For "Line 1", select RSI.

  4. For "Condition", choose "Crosses Above".

  5. For "Line 2", Type in 20

  6. Save the settings.

Add Open Trade and Close Trade Blocks

  1. Drag an Open Trade Block onto the canvas and connect it to the Condition Block.

  2. Configure it to "Buy" when the condition is met (Green Dot Connection).

  3. This will "Buy" when all the conditions are met

Compile Your Strategy

  • Click the "Compile" button to generate the code for your strategy.

This strategy will execute a buy when the 4HR Supertrend is bullish, and when the RSI crosses above 20.

Creating a 4HR Supertrend Indicator
Setting up a Condition Block with the Supertrend connected
Creating a RSI Indicator
Saved RSI Indicator Block
Creating a second Condition Block
Connecting the RSI to the second Condition Block
Finished Supertrend and RSI Strategy