PineScript SL Placement Problem

Job ID: 37891053

Budget: $30 – $250 USD

I need an experienced PineScript extension expert to diagnose and fix an issue with the stop loss (SL) placement in my algorithmic trading code.

The specifics of the desired functionality:
- I'm currently working with Moving Average.
- The issue I need help with is the SL calculation isn't happening until the candle finishes, which triggers the position.
- I am seeking a way to calculate this SL value before the triggering candle finishes.

The ideal freelancer for this project should have:
- Proficiency in PineScript
- Strong understanding of stop loss mechanisms
- High proficiency with indicators (Moving Average, RSI, Bollinger Bands)
- Proven problem solving skills with previous similar projects.

Your task will be to review my current code, identify the root cause of the SL issue, and implement a solution that allows the calculation of the SL value before the triggering candle closes. I look forward to your bid.
Related categories: Pine Script Trading