Fix a Pine Script DCA Bot strategy calculation problem and "freeze" strategy

Job ID: 32541780

Budget: €8 – €30 EUR

We have a strategy script (DCA style to use with 3 commas) that produces some errors on calculations (doesn't count well the trades (long or shorts) and commissions, and stops to calculate (hangs on one deal that never finishes) when the Base order - BO - take profit -TP - and Stop Loss - SL conditions happen simultaneously on the same candle. We need someone that can go trough the already made code and fix the math and errors explained above.
Related categories: Pine Script Trading