Pump gas compression

Can somebody explain why dynamic compression ratio matters enything to detonation, because when engine is running in maximum cylinder filling (highest torgue when intake charge doesnt flow back to intake manifold)its "dynamic compression" ratio is same as static compression ratio in that moment. Looks like only static compression ratio affect detonation. I hope someone understand what i mean.

It's all in the name...lol. as a point of review (and it sounds like you already get this part) - "Static" is the ratio of the volume of area swept by the piston when it's at the bottom of it's bore plus the volume of the chamber and gasket and area on top of the top ring vs. the volume of the piston at the top of it's travel plus the volume of the chamber and gasket and area on top of the top ring. In both positions the cylinder is sealed - both valves closed.
the issue is - the cylinder isn't sealed when the piston is at the bottom of it's travel. Both the exh and intake valves are open. So pressurization doesn't start happening until after the intake valve closes as the piston's moving up the bore on the compression stroke. The "Dynamic" ratio takes that closing event and the rod ratio into account and gives the builder a much better picture of what might be happening in the cylinder. The reason the others are saying the rest of the combo is so crutial is there is a whole bunch of physics that happens in a running engine that is based on what the cam, intake tract, and exh tracts are comprised of. In a running engine - the more efficient the ports and airflow is, the more intake charge is drawn and pushed into the chamber each time. On a racing engine that effectiveness comes at a higher rpm range where the physics works better. So while you can say there's "x" amount of pressure based on the formulas, that amount will rise in a properly designed intake system and the cylinder pressure will go higher than calculated.

Now to answer you - in my opinon - you're saying at peak torque the compression ratios are the same. I don't believe that's the case. The ratios never change. The volume of intake charge that is compressed does. Static and dynamic ratios are a calculated means for a builder to base decisions on. Cylinder pressure and volume of intake charge in the cylinder are (or can be) empirical measurements. That is exactly what volumetric efficiency is calculated from: the measured amount of torque made from a measured amount of air and fuel taken in.