Guide
How does the Simple_Pyramiding strategy work ?
The Simple_Pyramiding strategy cycles through a specified timeframe, automatically opening positions each day and closing them upon either a specified take profit trigger or optional stop loss. Equity is allocated across a maximum number of open positions to ensure distributed risk.
- Daily positions are based on the time frame's start, signaled by 'isStart' in the script, and each position's size is calculated by dividing equity by the configured max number of entries.
- Take profit and stop loss levels are individually determined for each trade—calculated as a percentage of the closing price at the time of entry—providing a mechanism to automatically secure gains or cut losses.
- Optional parameters allow for stop loss activation and closing of the position at the end of the trading session, reflecting the strategy’s flexibility around risk management.
The logic within the script uses loops to open and close positions up to the defined limits, guided by both the start and end time inputs. Each new entry and exit is uniquely labeled for tracking within the strategy’s execution.