Pekelo:
Here is a TOS ThinkScript I wrote a while back I used to aid analyzing similar trades.
For the Notation (m,n)
m is Number days prior to ExDividend for trade entry
n is Number of days after ExDividend for exit
m is 4,3,2, & 1
n is 1,0
All trades default to Close on Daily bars. (only...