Let's move beyond simple 2-step pyramids into professional-grade strategies.
// ============================================= // 3-STAGE MOMENTUM PYRAMIDING SYSTEM v1.0 // =============================================
// Define the buy and sell signals Buy = Cross(MA(C, 50), MA(C, 200)); Sell = Cross(MA(C, 200), MA(C, 50)); amibroker pyramiding
// Partial Exit: Sell 50% of position at 2R SellCond = C >= EntryPrice * 1.1; Sell = SellCond; SellQuantity = 50; // Percentage
You cannot simply use Buy = 1 repeatedly. Amibroker needs to see separate signals on different bars. This article provides a deep dive into implementing
This article provides a deep dive into implementing pyramiding strategies in AmiBroker, from foundational concepts to advanced AFL scripting. What is Pyramiding (Scaling In) in AmiBroker?
// Stage 1: Initial Entry Stage1 = Trend AND Cross( C, EMA( C, 20 ) ); including trend following
This constant tells the backtester that a "Buy" or "Short" signal is not a new trade, but an addition to an existing open position. 2. sigScaleOut
Pyramiding is a trading strategy that involves adding to a position as the price moves in a favorable direction. The idea behind pyramiding is to increase the size of a winning position, allowing traders to maximize their profits while minimizing their losses. Pyramiding can be used in conjunction with various trading strategies, including trend following, mean reversion, and momentum-based strategies.