Optimize Pine Script Strategy

Job ID: 39575052

Budget: $30 – $150 USD

I need help improving the performance of my Pine script strategy. Currently, the script does not execute the sub-cycles in the correct order, means, when the price touches the take profit (TP) of the last sub-cycle, the script incorrectly closes the first one.

Key requirements:
- Fix execution order of sub-cycles
- Ensure correct closing of trades at TP

The ideal candidate should have:
- Proven experience with Pine Script
- Strong debugging skills
- Ability to enhance script performance for accurate strategy outcomes

It is essential that the candidate demonstrate to me that they fully understand how the strategy works and what the problem is before being assigned to the job.
Related categories: Debugging Pine Script