Skip to main content

Sample Pine Script for MIRRORPIP Integration

This guide will help you create a basic TradingView Pine Script strategy that sends Buy ,Sell, Short and Cover  alerts to MIRRORPIP for automated crypto trading execution. Using TradingView + MIRRORPIP, you can:
  • Automate strategies
  • Execute trades on connected exchanges
  • Run webhook-based trading systems
  • Copy and scale strategies seamlessly

How MIRRORPIP Integration Works

The workflow is simple:
  1. TradingView strategy generates a signal
  2. TradingView alert sends webhook data
  3. MIRRORPIP receives the alert
  4. MIRRORPIP executes the trade on your connected exchange

Basic Pine Script Example

Below is a simple EMA crossover strategy example for MIRRORPIP integration.

What This Script Does

This strategy:
  • Uses:
    • EMAA HIGH BAND
    • EMA LOW BAND Generates:
    • BUY/COVER signal when Candle closes above HIGH EMA BAND (Green line)
    • SELL/SHORT signal when Candle closes below Low EMA BAND (Red line )
  • Sends webhook alerts to MIRRORPIP automatically

Step-by-Step Setup

Step 1 — Open TradingView

Go to: TradingView Open:
  • Pine Editor

Step 2 — Paste the Script

  1. Delete any existing code Paste the sample Pine Script Click:
    • Save
    • Add to Chart

Step 3 — Create TradingView Alert

  1. Click the Alert button
  2. Select your strategy
  3. In the alert settings:

Condition

Choose:
  • EMA BANDS STRATEGY

Interval

Choose:
  • same as charts

Expiration

Choose:
  • default date as per tradingview (usually T+30 DAYS)

Step 4 — Configure Alert Message

In Alert name : mention any desired name example : EMA BAND SETUP and in the message section strictly mention

Webhook URL

Paste  MIRRORPIP webhook URL : https://trade.mirrorpip.com/tradingview

Step 5 — Enable the Alert

Click:
  • Create Alert
Your TradingView strategy is now connected to MIRRORPIP. Please note you need paid version of tradingview to automate strategies from Tradingview to Mirrorpip OFFER : CLICK HERE TO GET 30 DAYS TRIAL OF TRADINGVIEW FREE*
\

Sample JSON Payload Sent to MIRRORPIP

MIRRORPIP reads this data and executes trades on your connected crypto exchange. In above example it will execute in Coinswitch.

Included Enhancements for your reference

Going a step further, we have added few enhanced parameters to assist users with :
  • Stop Loss (In points and percentage)
  • Take Profit (In points and percentage)
  • Risk Management (Max loss or profit per trade)
  • Quantity mode (Fixed or exposure based)
  • Intraday and positional mode
  • Partial exit (On Target 1 and remaining on Target 2 )
  • Trailing Stop Loss (In points and percentage)
  • P/L Dashboard on chart

Advanced Example Ideas

You can use above Pine as reference and build your own codes , alternatively we do provde access to Popular automation strategies on MIRRORPIP for FREE:
  • EMA crossover bots
  • RSI reversal strategies
  • Breakout systems
  • Scalping bots
  • Grid strategies
  • Options hedging systems
  • AI-generated TradingView signals
Get access to these pine by visiting respective articles around them.

Best Practices

✅ Always backtest your strategy before live trading ✅ Start with small capital initially ✅ Use proper risk management ✅ Monitor webhook logs inside MIRRORPIP ✅ Test alerts on paper trading first All strategies provided by Mirrorpip are Backtest enabled, Works on all Instruments Do-not repaint Fully automated with Mirrorpip platform

Common Errors

Alert Not Triggering

  • Ensure alerts are active
  • Confirm alert()   function exists in script

Webhook Not Received

  • Double-check MIRRORPIP webhook URL
  • Verify internet connectivity

No Trades Executed

  • Ensure exchange API is connected properly
  • Verify trading permissions are enabled

Need Help?

If you face issues integrating TradingView strategies with MIRRORPIP, contact the MIRRORPIP support team directly from your dashboard. Happy Automating 🚀