Thanks for posting - and some remarks if you don't mind:

- The Donchian_Entry series is not needed, it is identical to DE_Up (same for Donchian_Exit)

- For the entry series, the default optimize value is below its lower limit.

- OptimalF is always 1 because you have FACTORS not set.

- CrossOver/Under checks the crossing of the price not with a curve, but with a horizontal line. I'm not sure if that is what you intended. If you want to compare the price curve with the Donchian curve delayed by 1 bar, use instead:

if(crossOver(Price_Close,DE_Up+1)...

DE_Up[1] = the Donchian up value at the previous bar
DE_Up+1 = the Donchian up series delayed by 1 bar.