I am pretty sure that without seeing the actual strategy code, there is no one who could give you help.
As you have issues with optimization, I suggest to attach a screenshot from your Historical Tester's setting, together with the strategy that behaves wrongly.
If the strategy is confidential, you could send it to
[email protected], so they can investigate, without making it public.
Hope this helps to get you further.