---
title: "Stacking Orders with JSON Alerts: Pyramid &amp; Reverse Order Close Explained"
slug: pickmytrade-stacking-orders-json
date: 2025-09-10
modified: 2025-09-10
author: Bhavishya Goyal
excerpt: ""
meta_description: Learn how to stack up to 11 buy or sell orders in PickMyTrade using pyramid mode and reverse order close. Optimize execution time from 30s to 1s with a simple strategy adjustment.
focus_keyword: ""
canonical_url: "https://docs.pickmytrade.trade/docs/pickmytrade-stacking-orders-json/"
og_title: "Stacking Orders with JSON Alerts: Pyramid &amp; Reverse Order Close Explained"
og_description: Learn how to stack up to 11 buy or sell orders in PickMyTrade using pyramid mode and reverse order close. Optimize execution time from 30s to 1s with a simple strategy adjustment.
og_image: ""
schema_type: WebPage
categories: []
tags: []
reading_time: 2
word_count: 396
robots: "index, follow"
lang: en-US
---

# Stacking Orders with JSON Alerts: Pyramid &amp; Reverse Order Close Explained

**Last Updated:** September 10, 2025  |  **Published:** September 10, 2025

This document explains how the **`pyramid`** and **`reverse_order_close`** parameters in the JSON configuration control multiple open trades, and how you can configure your alerts for **faster stacking**.

---

## Key Parameters for Stacking Orders

### 1. `pyramid`

- **Default:** `false`
- **Function:** Controls whether multiple trades in the same direction can be stacked.
- **When set to `true`:**
  - Multiple **buy** signals can open multiple buy orders.
  - Multiple **sell** signals can open multiple sell orders.
  - Existing same-direction trades remain open until closed by user or opposite signal.

---

### 2. `reverse_order_close`

- **Default:** `false`
- **Function:** Controls whether opposite positions are automatically closed.
- **When set to `true`:**
  - A **buy** signal will close all open **sell** orders before opening new buy trades.
  - A **sell** signal will close all open **buy** orders before opening new sell trades.

---

## Tested Setup (Case Study)

We tested stacking entries with the following JSON parameters:

```
{
	"symbol": "MNQ1!",
	"data": "buy",
	"quantity": 1,
	"pyramid": true,
	"same_direction_ignore": false,
	"reverse_order_close": true,
..}
```

### Result:

- Able to **stack up to 11 trades** in the same direction (buy or sell).
- Opposite signals automatically **close existing trades** before opening new ones.
- Provides clean stacking with controlled risk management.

---

## Considerations

- With **`reverse_order_close = true`**, each new order must first check and close opposite positions before executing the new trade.

---

### How to Reduce Execution Time

If your strategy is sensitive to execution delays:

1. **Send a Close Signal First** – Instead of relying on reverse_order_close, design your strategy to send a **close alert** at the end of a stacking sequence.
2. **Then Send Opposite Signal** – After positions are closed, send the new opposite-direction entry.

Using this adjustment, order execution can be faster, even with multiple stacked trades.

---

## Practical Example

1. **Stacking Buys:**
  - 5 consecutive `buy` alerts received → 5 buy orders opened.
  - No positions closed since all are in the same direction.
2. **Closing Before Switching:**
  - Strategy sends a `close` alert → All 5 buy orders closes.
3. **Switching to Sell:**
  - Next `sell` alert is received → A new sell order opens almost instantly.
  - More `sell` alerts stack additional sell orders without delay.

---

## Recommendation

If your strategy relies on stacking entries, use:

```
"pyramid": true,
"reverse_order_close": true
```

And for faster execution:

- Adjust your strategy to **send a close signal before opposite direction entries**.
- This ensures stacking flexibility (up to 11 trades tested) with faster execution time.

[Get PickMyTrade → Automate Your TradingView Strategies](https://pickmytrade.trade "PickMyTrade - Automated Trading")

Last updated: **September 10, 2025**

For AI tools &amp; developers:[View Markdown →](https://docs.pickmytrade.trade/docs/pickmytrade-stacking-orders-json.md)