Amibroker Pyramiding -
In , pyramiding refers to adding to an existing position (scaling in) while a trade is still active, rather than closing it and opening a new one.
// Combine signals Buy = Buy1 OR Buy2;
if (Cond1[i]) SetPositionSize(33, spcPercentOfEquity); if (Cond2[i]) SetPositionSize(33, spcPercentOfEquity); if (Cond3[i]) SetPositionSize(34, spcPercentOfEquity); amibroker pyramiding
// First entry signal Buy1 = Cross( C, MA(C, 20) ); // Second entry signal (add more) Buy2 = Cross( C, MA(C, 50) ) AND BarsSince(Buy1) > 0; In , pyramiding refers to adding to an
Do not use ExRem if you want repeated signals. Instead, use ExRemSpan or manage state manually. 3. Controlling Position Size per Pyramid Level Use SetPositionSize() with the spcPercentOfEquity or spcPercentOfPosition flag inside your buy conditions. if (Cond1[i]) SetPositionSize(33