Historical Trade plots are not correctly connected to trades

I have unmanaged strategy. was following profitchase example that was in old forum..
in historical mode trades dont plot correctly, there is entry but its SL and TP are not from that entry.. and conneccting lines are all oever the place..
It seems like its not logical but sequential..

what to do?