🛠️ Tools
HomeGet AccessRequest A Feature
  • 🎯Start Here
    • Introduction
      • Disclaimer
      • Get this tool.
    • Overview
      • Why?
      • How To Use This?
      • Limitations
      • FAQ
  • 🎚️Settings
    • Signal Detection
    • Strategy Properties
    • Time Filter
    • Entry Stops
    • Take Profit
    • Visual Info
    • Broker Connector
      • Set up Broker Connector
  • 🤸Tips And Tricks
    • Chart Aesthetics
    • Tweak Your Settings
    • How To Create An Alert?
    • Live Monitoring
    • What Is The Best Trading Strategy?
      • How To Get The Best Strategy Results?
  • 📄Setup Instructions
    • Overview
      • Prerequisites
    • Generate Trading Signals
      • Build your own
      • Presets
        • 2 MA Cross
        • Reversal Signals [LuxAlgo]
        • SuperTrend
    • Connect Trading Signals To PSStrategyX
    • Set Up AutoView
      • Coupons & Referrals
    • Set Up An Exchange Account
      • Supported Exchanges
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Setup Instructions
  2. Generate Trading Signals
  3. Presets

SuperTrend

With EMA Filter adapted from built-in SuperTrend.

PreviousReversal Signals [LuxAlgo]NextConnect Trading Signals To PSStrategyX

Last updated 2 years ago

Was this helpful?

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © pAulseperformance

//@version=5
indicator("[preset] Supertrend", overlay = true)


[supertrend, direction] = ta.supertrend(3, input(14, 'ST_ATR Period'))
plot(direction < 0 ? supertrend : na, "Up direction", color.green,  1, style=plot.style_linebr)
plot(direction > 0 ? supertrend : na, "Down direction",  color.red, 1, style=plot.style_linebr)

ema1    = ta.ema(close, input.int(100, 'EMA Period'))
plot(ema1, "EMA", close > ema1 ? color.green : color.red, 1, style=plot.style_linebr)

buy = ta.crossunder(direction, 0) and close > ema1
sell = ta.crossover(direction, 0) and close < ema1
plotshape(buy, 'BUY', shape.labelup, location.belowbar, color.green, 0, 'BUY')
plotshape(sell, 'SELL', shape.labeldown, location.abovebar, color.red, 0, 'SELL')

signal = buy ? 1 : sell ? -1 :na 
plot(signal, 'signal')
📄
Supertrend